@finos/legend-query-builder 0.6.23 → 0.6.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +8 -5
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderConstantExpressionPanel.js +1 -1
  5. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  6. package/lib/components/QueryBuilderParametersPanel.js +1 -1
  7. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  8. package/lib/components/QueryBuilderSideBar.js +2 -2
  9. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  10. package/lib/components/QueryBuilder_TestID.d.ts +1 -1
  11. package/lib/components/QueryBuilder_TestID.d.ts.map +1 -1
  12. package/lib/components/QueryBuilder_TestID.js +1 -1
  13. package/lib/components/QueryBuilder_TestID.js.map +1 -1
  14. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +5 -5
  15. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  16. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
  17. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +3 -3
  18. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
  19. package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.d.ts → QueryBuilderTDSWindowPanel.d.ts} +4 -4
  20. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -0
  21. package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.js → QueryBuilderTDSWindowPanel.js} +94 -94
  22. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -0
  23. package/lib/components/workflows/ClassQueryBuilder.js +1 -1
  24. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  25. package/lib/components/workflows/MappingQueryBuilder.js +1 -1
  26. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  27. package/lib/graphManager/QueryBuilderHashUtils.d.ts +14 -14
  28. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
  29. package/lib/graphManager/QueryBuilderHashUtils.js +14 -14
  30. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
  31. package/lib/index.css +1 -1
  32. package/lib/package.json +6 -6
  33. package/lib/stores/QueryBuilderStateBuilder.js +1 -1
  34. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  35. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
  36. package/lib/stores/QueryBuilderValueSpecificationBuilder.js +2 -1
  37. package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
  38. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
  39. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +2 -1
  40. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
  41. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +6 -6
  42. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  43. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +13 -13
  44. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  45. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +2 -2
  46. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
  47. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +2 -2
  48. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  49. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts → window/QueryBuilderWindowGroupByOperatorLoader.d.ts} +3 -3
  50. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.d.ts.map +1 -0
  51. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js +36 -0
  52. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js.map +1 -0
  53. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts +91 -0
  54. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.d.ts.map +1 -0
  55. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByState.js → window/QueryBuilderWindowState.js} +55 -53
  56. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowState.js.map +1 -0
  57. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts → window/QueryBuilderWindowStateBuilder.d.ts} +1 -1
  58. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.d.ts.map +1 -0
  59. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js → window/QueryBuilderWindowStateBuilder.js} +10 -10
  60. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js.map +1 -0
  61. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts → window/QueryBuilderWindowValueSpecificationBuilder.d.ts} +3 -3
  62. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.d.ts.map +1 -0
  63. package/lib/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js → window/QueryBuilderWindowValueSpecificationBuilder.js} +5 -5
  64. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js.map +1 -0
  65. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.d.ts → window/operators/QueryBuilderTDS_WindowOperator.d.ts} +2 -2
  66. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts.map +1 -0
  67. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js → window/operators/QueryBuilderTDS_WindowOperator.js} +2 -2
  68. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.js.map +1 -0
  69. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts +25 -0
  70. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.d.ts.map +1 -0
  71. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.js → window/operators/QueryBuilderTDS_WindowOperator_Average.js} +6 -4
  72. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js.map +1 -0
  73. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts} +3 -3
  74. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.d.ts.map +1 -0
  75. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.js → window/operators/QueryBuilderTDS_WindowOperator_Count.js} +4 -4
  76. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js.map +1 -0
  77. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts} +3 -3
  78. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.d.ts.map +1 -0
  79. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.js → window/operators/QueryBuilderTDS_WindowOperator_Max.js} +4 -4
  80. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js.map +1 -0
  81. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts} +3 -3
  82. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.d.ts.map +1 -0
  83. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.js → window/operators/QueryBuilderTDS_WindowOperator_Min.js} +4 -4
  84. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js.map +1 -0
  85. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.d.ts → window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts} +3 -3
  86. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.d.ts.map +1 -0
  87. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.js → window/operators/QueryBuilderTDS_WindowOperator_Sum.js} +4 -4
  88. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js.map +1 -0
  89. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts} +3 -3
  90. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.d.ts.map +1 -0
  91. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.js → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js} +4 -4
  92. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js.map +1 -0
  93. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts} +3 -3
  94. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.d.ts.map +1 -0
  95. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.js → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js} +4 -4
  96. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js.map +1 -0
  97. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts} +3 -3
  98. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.d.ts.map +1 -0
  99. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.js → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js} +4 -4
  100. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_Rank.js.map +1 -0
  101. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.d.ts → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts} +3 -3
  102. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.d.ts.map +1 -0
  103. package/lib/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.js → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js} +4 -4
  104. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js.map +1 -0
  105. package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
  106. package/lib/stores/shared/LambdaParameterState.js.map +1 -1
  107. package/package.json +13 -13
  108. package/src/components/QueryBuilder.tsx +16 -6
  109. package/src/components/QueryBuilderConstantExpressionPanel.tsx +1 -1
  110. package/src/components/QueryBuilderParametersPanel.tsx +1 -1
  111. package/src/components/QueryBuilderSideBar.tsx +2 -2
  112. package/src/components/QueryBuilder_TestID.ts +1 -1
  113. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +8 -8
  114. package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +6 -8
  115. package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel.tsx → QueryBuilderTDSWindowPanel.tsx} +166 -166
  116. package/src/components/workflows/ClassQueryBuilder.tsx +1 -1
  117. package/src/components/workflows/MappingQueryBuilder.tsx +1 -1
  118. package/src/graphManager/QueryBuilderHashUtils.ts +14 -14
  119. package/src/stores/QueryBuilderStateBuilder.ts +1 -1
  120. package/src/stores/QueryBuilderValueSpecificationBuilder.ts +4 -2
  121. package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +3 -1
  122. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +16 -16
  123. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +2 -2
  124. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +2 -2
  125. package/src/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.ts +39 -0
  126. package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByState.ts → window/QueryBuilderWindowState.ts} +83 -76
  127. package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.ts → window/QueryBuilderWindowStateBuilder.ts} +19 -19
  128. package/src/stores/fetch-structure/tds/{olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.ts → window/QueryBuilderWindowValueSpecificationBuilder.ts} +9 -9
  129. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.ts → window/operators/QueryBuilderTDS_WindowOperator.ts} +1 -1
  130. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.ts → window/operators/QueryBuilderTDS_WindowOperator_Average.ts} +5 -3
  131. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.ts → window/operators/QueryBuilderTDS_WindowOperator_Count.ts} +3 -3
  132. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.ts → window/operators/QueryBuilderTDS_WindowOperator_Max.ts} +3 -3
  133. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.ts → window/operators/QueryBuilderTDS_WindowOperator_Min.ts} +3 -3
  134. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.ts → window/operators/QueryBuilderTDS_WindowOperator_Sum.ts} +3 -3
  135. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_AverageRank.ts} +3 -3
  136. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_DenseRank.ts} +3 -3
  137. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.ts → window/operators/QueryBuilderTDS_WindowRankOperator_Rank.ts} +3 -3
  138. package/src/stores/fetch-structure/tds/{olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.ts → window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.ts} +3 -3
  139. package/src/stores/shared/LambdaParameterState.ts +1 -0
  140. package/tsconfig.json +15 -15
  141. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +0 -1
  142. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +0 -1
  143. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +0 -1
  144. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js +0 -36
  145. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +0 -1
  146. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts +0 -91
  147. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +0 -1
  148. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +0 -1
  149. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +0 -1
  150. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +0 -1
  151. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +0 -1
  152. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +0 -1
  153. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.d.ts.map +0 -1
  154. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js.map +0 -1
  155. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.d.ts.map +0 -1
  156. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Average.js.map +0 -1
  157. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.d.ts.map +0 -1
  158. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Count.js.map +0 -1
  159. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.d.ts.map +0 -1
  160. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Max.js.map +0 -1
  161. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.d.ts.map +0 -1
  162. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Min.js.map +0 -1
  163. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.d.ts +0 -25
  164. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.d.ts.map +0 -1
  165. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPOperator_Sum.js.map +0 -1
  166. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.d.ts.map +0 -1
  167. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_AverageRank.js.map +0 -1
  168. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.d.ts.map +0 -1
  169. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_DenseRank.js.map +0 -1
  170. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.d.ts.map +0 -1
  171. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_Rank.js.map +0 -1
  172. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.d.ts.map +0 -1
  173. package/lib/stores/fetch-structure/tds/olapGroupBy/operators/QueryBuilderTDS_OLAPRankOperator_RowNumber.js.map +0 -1
  174. package/src/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.ts +0 -39
@@ -157,7 +157,7 @@ const ClassQueryBuilderSetupPanelContent = observer(
157
157
  filterOption={mappingFilterOption}
158
158
  formatOptionLabel={getPackageableElementOptionFormatter({
159
159
  darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
160
- pureModel: queryBuilderState.graphManagerState.graph,
160
+ graph: queryBuilderState.graphManagerState.graph,
161
161
  })}
162
162
  />
163
163
  </div>
@@ -151,7 +151,7 @@ const MappingQueryBuilderSetupPanelContent = observer(
151
151
  filterOption={mappingFilterOption}
152
152
  formatOptionLabel={getPackageableElementOptionFormatter({
153
153
  darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
154
- pureModel: queryBuilderState.graphManagerState.graph,
154
+ graph: queryBuilderState.graphManagerState.graph,
155
155
  })}
156
156
  />
157
157
  </div>
@@ -67,20 +67,20 @@ export enum QUERY_BUILDER_HASH_STRUCTURE {
67
67
  WATERMARK_STATE = 'WATERMARK_STATE',
68
68
 
69
69
  // OLAPGroup state
70
- TDS_OLAP_GROUPBY_STATE = 'TDS_OLAP_GROUPBY_STATE',
71
- TDS_OLAP_GROUPBY_OPERATION_STATE = 'TDS_OLAP_GROUPBY_OPERATION_STATE',
72
- TDS_OLAP_GROUPBY_AGG_OPERATION_STATE = 'TDS_OLAP_GROUPBY_AGG_OPERATION_STATE',
73
- TDS_OLAP_GROUPBY_COLUMN_STATE = 'TDS_OLAP_GROUPBY_COLUMN_STATE',
74
- TDS_OLAP_GROUPBY_COLUMN_SORTBY_STATE = 'TDS_OLAP_GROUPBY_COLUMN_SORTBY_STATE',
75
- TDS_OLAP_OPERATOR_RANK = 'TDS_OLAP_OPERATOR_RANK',
76
- TDS_OLAP_OPERATOR_AVERAGE_RANK = 'TDS_OLAP_OPERATOR_AVERAGE_RANK',
77
- TDS_OLAP_OPERATOR_DENSE_RANK = 'TDS_OLAP_OPERATOR_DENSE_RANK',
78
- TDS_OLAP_OPERATOR_ROW_NUMBER = 'TDS_OLAP_OPERATOR_ROW_NUMBER',
79
- TDS_OLAP_OPERATOR_SUM = 'TDS_OLAP_OPERATOR_SUM',
80
- TDS_OLAP_OPERATOR_MAX = 'TDS_OLAP_OPERATOR_MAX',
81
- TDS_OLAP_OPERATOR_MIN = 'TDS_OLAP_OPERATOR_MIN',
82
- TDS_OLAP_OPERATOR_COUNT = 'TDS_OLAP_OPERATOR_COUNT',
83
- TDS_OLAP_OPERATOR_AVERAGE = 'TDS_OLAP_OPERATOR_AVERAGE',
70
+ TDS_WINDOW_GROUPBY_STATE = 'TDS_WINDOW_STATE',
71
+ TDS_WINDOW_GROUPBY_OPERATION_STATE = 'TDS_WINDOW_OPERATION_STATE',
72
+ TDS_WINDOW_GROUPBY_AGG_OPERATION_STATE = 'TDS_WINDOW_AGG_OPERATION_STATE',
73
+ TDS_WINDOW_COLUMN_STATE = 'TDS_WINDOW_COLUMN_STATE',
74
+ TDS_WINDOW_COLUMN_SORTBY_STATE = 'TDS_WINDOW_COLUMN_SORTBY_STATE',
75
+ TDS_WINDOW_OPERATOR_RANK = 'TDS_WINDOW_OPERATOR_RANK',
76
+ TDS_WINDOW_OPERATOR_AVERAGE_RANK = 'TDS_WINDOW_OPERATOR_AVERAGE_RANK',
77
+ TDS_WINDOW_OPERATOR_DENSE_RANK = 'TDS_WINDOW_OPERATOR_DENSE_RANK',
78
+ TDS_WINDOW_OPERATOR_ROW_NUMBER = 'TDS_WINDOW_OPERATOR_ROW_NUMBER',
79
+ TDS_WINDOW_OPERATOR_SUM = 'TDS_WINDOW_OPERATOR_SUM',
80
+ TDS_WINDOW_OPERATOR_MAX = 'TDS_WINDOW_OPERATOR_MAX',
81
+ TDS_WINDOW_OPERATOR_MIN = 'TDS_WINDOW_OPERATOR_MIN',
82
+ TDS_WINDOW_OPERATOR_COUNT = 'TDS_WINDOW_OPERATOR_COUNT',
83
+ TDS_WINDOW_OPERATOR_AVERAGE = 'TDS_WINDOW_OPERATOR_AVERAGE',
84
84
 
85
85
  // filter state
86
86
  FILTER_TREE_GROUP_NODE_DATA = 'FILTER_TREE_GROUP_NODE_DATA',
@@ -66,7 +66,7 @@ import {
66
66
  } from './fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js';
67
67
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../graphManager/QueryBuilderSupportedFunctions.js';
68
68
  import { LambdaParameterState } from './shared/LambdaParameterState.js';
69
- import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js';
69
+ import { processTDS_OLAPGroupByExpression } from './fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js';
70
70
  import { processWatermarkExpression } from './watermark/QueryBuilderWatermarkStateBuilder.js';
71
71
  import { QueryBuilderConstantExpressionState } from './QueryBuilderConstantsState.js';
72
72
 
@@ -132,7 +132,6 @@ export const buildLambdaFunction = (
132
132
  _class,
133
133
  Multiplicity.ONE,
134
134
  );
135
-
136
135
  lambdaFunction.expressionSequence[0] = getAllVersionsFunction;
137
136
  } else {
138
137
  // build getAll()
@@ -169,7 +168,10 @@ export const buildLambdaFunction = (
169
168
  ];
170
169
  }
171
170
  // build parameters
172
- if (queryBuilderState.parametersState.parameterStates.length) {
171
+ if (
172
+ queryBuilderState.parametersState.parameterStates.length &&
173
+ !options?.useAllVersionsForMilestoning
174
+ ) {
173
175
  if (options?.isBuildingExecutionQuery) {
174
176
  buildExecutionQueryFromLambdaFunction(
175
177
  lambdaFunction,
@@ -102,7 +102,9 @@ export const buildPropertyExpressionChain = (
102
102
  const name = currentExpression.func.value.name;
103
103
  const property =
104
104
  currentExpression.func.value._OWNER._generatedMilestonedProperties.find(
105
- (e) => e.name === `${name}${MILESTONING_VERSION_PROPERTY_SUFFIX}`,
105
+ (e) =>
106
+ e.name ===
107
+ `${name}${MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS}`,
106
108
  );
107
109
  if (property) {
108
110
  propertyExpression_setFunc(
@@ -92,9 +92,9 @@ import type { LambdaFunctionBuilderOption } from '../../QueryBuilderValueSpecifi
92
92
  import { appendProjection } from './projection/QueryBuilderProjectionValueSpecificationBuilder.js';
93
93
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graphManager/QueryBuilderSupportedFunctions.js';
94
94
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
95
- import { QueryBuilderOLAPGroupByState } from './olapGroupBy/QueryBuilderOLAPGroupByState.js';
96
- import type { QueryBuilderTDS_OLAPOperator } from './olapGroupBy/operators/QueryBuilderTDS_OLAPOperator.js';
97
- import { getQueryBuilderCoreOLAPGroupByOperators } from './olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js';
95
+ import { QueryBuilderWindowState } from './window/QueryBuilderWindowState.js';
96
+ import type { QueryBuilderTDS_WindowOperator } from './window/operators/QueryBuilderTDS_WindowOperator.js';
97
+ import { getQueryBuilderCoreWindowOperators } from './window/QueryBuilderWindowGroupByOperatorLoader.js';
98
98
  import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
99
99
 
100
100
  export class QueryBuilderTDSState
@@ -103,19 +103,19 @@ export class QueryBuilderTDSState
103
103
  {
104
104
  readonly aggregationState: QueryBuilderAggregationState;
105
105
  readonly postFilterState: QueryBuilderPostFilterState;
106
- readonly olapGroupByState: QueryBuilderOLAPGroupByState;
106
+ readonly windowState: QueryBuilderWindowState;
107
107
  readonly resultSetModifierState: QueryResultSetModifierState;
108
108
  projectionColumns: QueryBuilderProjectionColumnState[] = [];
109
109
  isConvertDerivationProjectionObjects = false;
110
110
  showPostFilterPanel = false;
111
- showOlapGroupByPanel = false;
111
+ showWindowFuncPanel = false;
112
112
 
113
113
  postFilterOperators: QueryBuilderPostFilterOperator[] =
114
114
  getQueryBuilderCorePostFilterOperators();
115
115
  aggregationOperators: QueryBuilderAggregateOperator[] =
116
116
  getQueryBuilderCoreAggregrationOperators();
117
- olapGroupByOperators: QueryBuilderTDS_OLAPOperator[] =
118
- getQueryBuilderCoreOLAPGroupByOperators();
117
+ windowFuncOperators: QueryBuilderTDS_WindowOperator[] =
118
+ getQueryBuilderCoreWindowOperators();
119
119
 
120
120
  constructor(
121
121
  queryBuilderState: QueryBuilderState,
@@ -127,7 +127,7 @@ export class QueryBuilderTDSState
127
127
  projectionColumns: observable,
128
128
  isConvertDerivationProjectionObjects: observable,
129
129
  showPostFilterPanel: observable,
130
- showOlapGroupByPanel: observable,
130
+ showWindowFuncPanel: observable,
131
131
  TEMPORARY__showPostFetchStructurePanel: computed,
132
132
  derivations: computed,
133
133
  hasParserError: computed,
@@ -135,7 +135,7 @@ export class QueryBuilderTDSState
135
135
  moveColumn: action,
136
136
  replaceColumn: action,
137
137
  setShowPostFilterPanel: action,
138
- setShowOlapGroupByPanel: action,
138
+ setShowWindowFuncPanel: action,
139
139
  convertDerivationProjectionObjects: flow,
140
140
  });
141
141
 
@@ -148,9 +148,9 @@ export class QueryBuilderTDSState
148
148
  this,
149
149
  this.aggregationOperators,
150
150
  );
151
- this.olapGroupByState = new QueryBuilderOLAPGroupByState(
151
+ this.windowState = new QueryBuilderWindowState(
152
152
  this,
153
- this.olapGroupByOperators,
153
+ this.windowFuncOperators,
154
154
  );
155
155
  }
156
156
 
@@ -173,7 +173,7 @@ export class QueryBuilderTDSState
173
173
  override get TEMPORARY__showPostFetchStructurePanel(): boolean {
174
174
  return (
175
175
  this.queryBuilderState.filterState.showPanel ||
176
- this.showOlapGroupByPanel ||
176
+ this.showWindowFuncPanel ||
177
177
  this.showPostFilterPanel
178
178
  );
179
179
  }
@@ -279,7 +279,7 @@ export class QueryBuilderTDSState
279
279
  return [
280
280
  ...this.aggregationState.columns,
281
281
  ...projectionColumns,
282
- ...this.olapGroupByState.olapColumns,
282
+ ...this.windowState.windowColumns,
283
283
  ];
284
284
  }
285
285
 
@@ -293,7 +293,7 @@ export class QueryBuilderTDSState
293
293
  return Boolean(
294
294
  [
295
295
  ...this.postFilterState.referencedTDSColumns,
296
- ...this.olapGroupByState.referencedTDSColumns,
296
+ ...this.windowState.referencedTDSColumns,
297
297
  ].find((col) => {
298
298
  if (col instanceof QueryBuilderAggregateColumnState) {
299
299
  return tdsCol instanceof QueryBuilderAggregateColumnState
@@ -320,8 +320,8 @@ export class QueryBuilderTDSState
320
320
  this.showPostFilterPanel = val;
321
321
  }
322
322
 
323
- setShowOlapGroupByPanel(val: boolean): void {
324
- this.showOlapGroupByPanel = val;
323
+ setShowWindowFuncPanel(val: boolean): void {
324
+ this.showWindowFuncPanel = val;
325
325
  }
326
326
 
327
327
  *convertDerivationProjectionObjects(): GeneratorFn<void> {
@@ -17,7 +17,7 @@
17
17
  import { Multiplicity } from '@finos/legend-graph';
18
18
  import { UnsupportedOperationError } from '@finos/legend-shared';
19
19
  import { QueryBuilderAggregateColumnState } from '../../aggregation/QueryBuilderAggregationState.js';
20
- import { QueryBuilderOLAPGroupByColumnState } from '../../olapGroupBy/QueryBuilderOLAPGroupByState.js';
20
+ import { QueryBuilderWindowColumnState } from '../../window/QueryBuilderWindowState.js';
21
21
  import { QueryBuilderSimpleProjectionColumnState } from '../../projection/QueryBuilderProjectionColumnState.js';
22
22
  import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
23
23
 
@@ -26,7 +26,7 @@ export const getColumnMultiplicity = (
26
26
  ): Multiplicity => {
27
27
  if (
28
28
  columnState instanceof QueryBuilderAggregateColumnState ||
29
- columnState instanceof QueryBuilderOLAPGroupByColumnState
29
+ columnState instanceof QueryBuilderWindowColumnState
30
30
  ) {
31
31
  return Multiplicity.ONE;
32
32
  } else if (columnState instanceof QueryBuilderSimpleProjectionColumnState) {
@@ -47,7 +47,7 @@ import {
47
47
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
48
48
  import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
49
49
  import { buildPropertyExpressionChain } from '../../../QueryBuilderValueSpecificationBuilderHelper.js';
50
- import { appendOLAPGroupByState } from '../olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js';
50
+ import { appendOLAPGroupByState } from '../window/QueryBuilderWindowValueSpecificationBuilder.js';
51
51
  import { appendPostFilter } from '../post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js';
52
52
 
53
53
  const buildSortExpression = (
@@ -370,7 +370,7 @@ export const appendProjection = (
370
370
  }
371
371
 
372
372
  // build olapGroupBy
373
- appendOLAPGroupByState(tdsState.olapGroupByState, lambdaFunction);
373
+ appendOLAPGroupByState(tdsState.windowState, lambdaFunction);
374
374
 
375
375
  // build post-filter
376
376
  appendPostFilter(tdsState.postFilterState, lambdaFunction);
@@ -0,0 +1,39 @@
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 { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
18
+ import { QueryBuilderTDS_WindowRankOperator_AverageRank } from './operators/QueryBuilderTDS_WindowRankOperator_AverageRank.js';
19
+ import { QueryBuilderTDS_WindowRankOperator_DenseRank } from './operators/QueryBuilderTDS_WindowRankOperator_DenseRank.js';
20
+ import { QueryBuilderTDS_WindowRankOperator_Rank } from './operators/QueryBuilderTDS_WindowRankOperator_Rank.js';
21
+ import { QueryBuilderTDS_WindowRankOperator_RowNumber } from './operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js';
22
+ import { QueryBuilderTDS_WindowOperator_Sum } from './operators/QueryBuilderTDS_WindowOperator_Sum.js';
23
+ import { QueryBuilderTDS_WindowOperator_Count } from './operators/QueryBuilderTDS_WindowOperator_Count.js';
24
+ import { QueryBuilderTDS_WindowOperator_Max } from './operators/QueryBuilderTDS_WindowOperator_Max.js';
25
+ import { QueryBuilderTDS_WindowOperator_Min } from './operators/QueryBuilderTDS_WindowOperator_Min.js';
26
+ import { QueryBuilderTDS_WindowOperator_Average } from './operators/QueryBuilderTDS_WindowOperator_Average.js';
27
+
28
+ export const getQueryBuilderCoreWindowOperators =
29
+ (): QueryBuilderTDS_WindowOperator[] => [
30
+ new QueryBuilderTDS_WindowOperator_Sum(),
31
+ new QueryBuilderTDS_WindowOperator_Count(),
32
+ new QueryBuilderTDS_WindowOperator_Max(),
33
+ new QueryBuilderTDS_WindowOperator_Min(),
34
+ new QueryBuilderTDS_WindowOperator_Average(),
35
+ new QueryBuilderTDS_WindowRankOperator_AverageRank(),
36
+ new QueryBuilderTDS_WindowRankOperator_DenseRank(),
37
+ new QueryBuilderTDS_WindowRankOperator_Rank(),
38
+ new QueryBuilderTDS_WindowRankOperator_RowNumber(),
39
+ ];
@@ -30,19 +30,19 @@ import type { QueryBuilderProjectionColumnDragSource } from '../projection/Query
30
30
  import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
31
31
  import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
32
32
  import type { COLUMN_SORT_TYPE } from '../QueryResultSetModifierState.js';
33
- import type { QueryBuilderTDS_OLAPOperator } from './operators/QueryBuilderTDS_OLAPOperator.js';
33
+ import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
34
34
 
35
- export const QUERY_BUILDER_OLAP_COLUMN_DND_TYPE = 'OLAP_COLUMN';
35
+ export const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = 'WINDOW_COLUMN';
36
36
 
37
- export interface QueryBuilderOLAPColumnDragSource {
37
+ export interface QueryBuilderWindowColumnDragSource {
38
38
  columnState: QueryBuilderTDSColumnState;
39
39
  }
40
40
 
41
- export type QueryBuilderOLAPDropTarget =
41
+ export type QueryBuilderWindowDropTarget =
42
42
  | QueryBuilderProjectionColumnDragSource
43
- | QueryBuilderOLAPColumnDragSource;
43
+ | QueryBuilderWindowColumnDragSource;
44
44
 
45
- export class OLAPGroupByColumnSortByState implements Hashable {
45
+ export class WindowGroupByColumnSortByState implements Hashable {
46
46
  columnState: QueryBuilderTDSColumnState;
47
47
  sortType: COLUMN_SORT_TYPE;
48
48
 
@@ -71,23 +71,23 @@ export class OLAPGroupByColumnSortByState implements Hashable {
71
71
 
72
72
  get hashCode(): string {
73
73
  return hashArray([
74
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_COLUMN_SORTBY_STATE,
74
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_SORTBY_STATE,
75
75
  this.sortType,
76
76
  this.columnState.columnName,
77
77
  ]);
78
78
  }
79
79
  }
80
80
 
81
- export abstract class QueryBuilderTDS_OLAPOperatorState implements Hashable {
82
- readonly olapState: QueryBuilderOLAPGroupByState;
81
+ export abstract class QueryBuilderTDS_WindowOperatorState implements Hashable {
82
+ readonly windowState: QueryBuilderWindowState;
83
83
  lambdaParameterName: string = DEFAULT_LAMBDA_VARIABLE_NAME;
84
- operator: QueryBuilderTDS_OLAPOperator;
84
+ operator: QueryBuilderTDS_WindowOperator;
85
85
 
86
86
  constructor(
87
- olapState: QueryBuilderOLAPGroupByState,
88
- operator: QueryBuilderTDS_OLAPOperator,
87
+ windowState: QueryBuilderWindowState,
88
+ operator: QueryBuilderTDS_WindowOperator,
89
89
  ) {
90
- this.olapState = olapState;
90
+ this.windowState = windowState;
91
91
  this.operator = operator;
92
92
  }
93
93
 
@@ -95,39 +95,39 @@ export abstract class QueryBuilderTDS_OLAPOperatorState implements Hashable {
95
95
  this.lambdaParameterName = paramName;
96
96
  }
97
97
 
98
- setOperator(val: QueryBuilderTDS_OLAPOperator): void {
98
+ setOperator(val: QueryBuilderTDS_WindowOperator): void {
99
99
  this.operator = val;
100
100
  }
101
101
 
102
102
  get hashCode(): string {
103
103
  return hashArray([
104
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_OPERATION_STATE,
104
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_OPERATION_STATE,
105
105
  this.lambdaParameterName,
106
106
  this.operator,
107
107
  ]);
108
108
  }
109
109
  }
110
110
 
111
- export class QueryBuilderTDS_OLAPRankOperatorState extends QueryBuilderTDS_OLAPOperatorState {
111
+ export class QueryBuilderTDS_WindowRankOperatorState extends QueryBuilderTDS_WindowOperatorState {
112
112
  constructor(
113
- olapState: QueryBuilderOLAPGroupByState,
114
- operator: QueryBuilderTDS_OLAPOperator,
113
+ windowState: QueryBuilderWindowState,
114
+ operator: QueryBuilderTDS_WindowOperator,
115
115
  ) {
116
- super(olapState, operator);
116
+ super(windowState, operator);
117
117
  makeObservable(this, {
118
118
  setLambdaParameterName: action,
119
119
  });
120
120
  }
121
121
  }
122
122
 
123
- export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS_OLAPOperatorState {
123
+ export class QueryBuilderTDS_WindowAggreationOperatorState extends QueryBuilderTDS_WindowOperatorState {
124
124
  columnState: QueryBuilderTDSColumnState;
125
125
  constructor(
126
- olapState: QueryBuilderOLAPGroupByState,
127
- operator: QueryBuilderTDS_OLAPOperator,
126
+ windowState: QueryBuilderWindowState,
127
+ operator: QueryBuilderTDS_WindowOperator,
128
128
  columnState: QueryBuilderTDSColumnState,
129
129
  ) {
130
- super(olapState, operator);
130
+ super(windowState, operator);
131
131
  makeObservable(this, {
132
132
  columnState: observable,
133
133
  setColumnState: action,
@@ -142,7 +142,7 @@ export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS
142
142
 
143
143
  override get hashCode(): string {
144
144
  return hashArray([
145
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_AGG_OPERATION_STATE,
145
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_AGG_OPERATION_STATE,
146
146
  this.lambdaParameterName,
147
147
  this.operator,
148
148
  this.columnState.columnName,
@@ -150,21 +150,21 @@ export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS
150
150
  }
151
151
  }
152
152
 
153
- export class QueryBuilderOLAPGroupByColumnState
153
+ export class QueryBuilderWindowColumnState
154
154
  extends QueryBuilderTDSColumnState
155
155
  implements Hashable
156
156
  {
157
- readonly olapState: QueryBuilderOLAPGroupByState;
157
+ readonly windowState: QueryBuilderWindowState;
158
158
  windowColumns: QueryBuilderTDSColumnState[] = [];
159
- sortByState: OLAPGroupByColumnSortByState | undefined;
160
- operationState: QueryBuilderTDS_OLAPOperatorState;
159
+ sortByState: WindowGroupByColumnSortByState | undefined;
160
+ operationState: QueryBuilderTDS_WindowOperatorState;
161
161
  columnName: string;
162
162
 
163
163
  constructor(
164
- olapState: QueryBuilderOLAPGroupByState,
164
+ windowState: QueryBuilderWindowState,
165
165
  windowColumns: QueryBuilderTDSColumnState[],
166
- sortType: OLAPGroupByColumnSortByState | undefined,
167
- operationState: QueryBuilderTDS_OLAPOperatorState,
166
+ sortType: WindowGroupByColumnSortByState | undefined,
167
+ operationState: QueryBuilderTDS_WindowOperatorState,
168
168
  columnName: string,
169
169
  ) {
170
170
  super();
@@ -182,29 +182,32 @@ export class QueryBuilderOLAPGroupByColumnState
182
182
  changeOperator: action,
183
183
  changeSortBy: action,
184
184
  });
185
- this.olapState = olapState;
185
+ this.windowState = windowState;
186
186
  this.windowColumns = windowColumns;
187
187
  this.sortByState = sortType;
188
188
  this.operationState = operationState;
189
189
  this.columnName = columnName;
190
190
  }
191
191
 
192
- get columnOLAPGroupIdx(): number {
193
- return this.olapState.olapColumns.findIndex((e) => e === this);
192
+ get columnWindowGroupIdx(): number {
193
+ return this.windowState.windowColumns.findIndex((e) => e === this);
194
194
  }
195
195
 
196
196
  get possibleReferencedColumns(): QueryBuilderTDSColumnState[] {
197
- // column can only reference TDS columns already defined, i.e in an earlier index of the olap columns
198
- const idx = this.olapState.tdsState.tdsColumns.findIndex((e) => e === this);
197
+ // column can only reference TDS columns already defined, i.e in an earlier index of the window columns
198
+ const idx = this.windowState.tdsState.tdsColumns.findIndex(
199
+ (e) => e === this,
200
+ );
199
201
  if (idx === -1) {
200
- return this.olapState.tdsState.tdsColumns;
202
+ return this.windowState.tdsState.tdsColumns;
201
203
  }
202
- return this.olapState.tdsState.tdsColumns.slice(0, idx);
204
+ return this.windowState.tdsState.tdsColumns.slice(0, idx);
203
205
  }
204
206
 
205
207
  get referencedTDSColumns(): QueryBuilderTDSColumnState[] {
206
208
  const operatorReference =
207
- this.operationState instanceof QueryBuilderTDS_OLAPAggreationOperatorState
209
+ this.operationState instanceof
210
+ QueryBuilderTDS_WindowAggreationOperatorState
208
211
  ? [this.operationState.columnState]
209
212
  : [];
210
213
  const soryByReference = this.sortByState
@@ -215,7 +218,7 @@ export class QueryBuilderOLAPGroupByColumnState
215
218
 
216
219
  getColumnType(): Type | undefined {
217
220
  return this.operationState.operator.getOperatorReturnType(
218
- this.olapState.tdsState.queryBuilderState.graphManagerState.graph,
221
+ this.windowState.tdsState.queryBuilderState.graphManagerState.graph,
219
222
  );
220
223
  }
221
224
 
@@ -223,11 +226,11 @@ export class QueryBuilderOLAPGroupByColumnState
223
226
  this.columnName = val;
224
227
  }
225
228
 
226
- setOperatorState(op: QueryBuilderTDS_OLAPOperatorState): void {
229
+ setOperatorState(op: QueryBuilderTDS_WindowOperatorState): void {
227
230
  this.operationState = op;
228
231
  }
229
232
 
230
- setSortBy(val: OLAPGroupByColumnSortByState | undefined): void {
233
+ setSortBy(val: WindowGroupByColumnSortByState | undefined): void {
231
234
  this.sortByState = val;
232
235
  }
233
236
 
@@ -244,7 +247,7 @@ export class QueryBuilderOLAPGroupByColumnState
244
247
  }
245
248
 
246
249
  possibleAggregatedColumns(
247
- op: QueryBuilderTDS_OLAPOperator,
250
+ op: QueryBuilderTDS_WindowOperator,
248
251
  ): QueryBuilderTDSColumnState[] {
249
252
  if (op.isColumnAggregator()) {
250
253
  return this.possibleReferencedColumns.filter((col) =>
@@ -254,31 +257,35 @@ export class QueryBuilderOLAPGroupByColumnState
254
257
  return [];
255
258
  }
256
259
 
257
- changeOperator(olapOp: QueryBuilderTDS_OLAPOperator): void {
260
+ changeOperator(windowOp: QueryBuilderTDS_WindowOperator): void {
258
261
  const currentOperator = this.operationState.operator;
259
262
  const currentAggregateColumn =
260
- this.operationState instanceof QueryBuilderTDS_OLAPAggreationOperatorState
263
+ this.operationState instanceof
264
+ QueryBuilderTDS_WindowAggreationOperatorState
261
265
  ? this.operationState.columnState
262
266
  : undefined;
263
- if (currentOperator !== olapOp) {
264
- if (olapOp.isColumnAggregator()) {
267
+ if (currentOperator !== windowOp) {
268
+ if (windowOp.isColumnAggregator()) {
265
269
  const compatibleAggCol =
266
270
  currentAggregateColumn &&
267
- olapOp.isCompatibleWithColumn(currentAggregateColumn)
271
+ windowOp.isCompatibleWithColumn(currentAggregateColumn)
268
272
  ? currentAggregateColumn
269
- : this.possibleAggregatedColumns(olapOp)[0];
273
+ : this.possibleAggregatedColumns(windowOp)[0];
270
274
  if (compatibleAggCol) {
271
275
  this.setOperatorState(
272
- new QueryBuilderTDS_OLAPAggreationOperatorState(
273
- this.olapState,
274
- olapOp,
276
+ new QueryBuilderTDS_WindowAggreationOperatorState(
277
+ this.windowState,
278
+ windowOp,
275
279
  compatibleAggCol,
276
280
  ),
277
281
  );
278
282
  }
279
283
  } else {
280
284
  this.setOperatorState(
281
- new QueryBuilderTDS_OLAPRankOperatorState(this.olapState, olapOp),
285
+ new QueryBuilderTDS_WindowRankOperatorState(
286
+ this.windowState,
287
+ windowOp,
288
+ ),
282
289
  );
283
290
  }
284
291
  }
@@ -290,7 +297,7 @@ export class QueryBuilderOLAPGroupByColumnState
290
297
  if (sortOp) {
291
298
  const sortInfoOpState =
292
299
  sortByState ??
293
- new OLAPGroupByColumnSortByState(
300
+ new WindowGroupByColumnSortByState(
294
301
  guaranteeNonNullable(this.possibleReferencedColumns[0]),
295
302
  sortOp,
296
303
  );
@@ -304,7 +311,7 @@ export class QueryBuilderOLAPGroupByColumnState
304
311
 
305
312
  get hashCode(): string {
306
313
  return hashArray([
307
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_COLUMN_STATE,
314
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_STATE,
308
315
  hashArray(this.windowColumns),
309
316
  this.sortByState ?? '',
310
317
  this.operationState,
@@ -313,20 +320,20 @@ export class QueryBuilderOLAPGroupByColumnState
313
320
  }
314
321
  }
315
322
 
316
- export class QueryBuilderOLAPGroupByState implements Hashable {
323
+ export class QueryBuilderWindowState implements Hashable {
317
324
  readonly tdsState: QueryBuilderTDSState;
318
- olapColumns: QueryBuilderOLAPGroupByColumnState[] = [];
319
- operators: QueryBuilderTDS_OLAPOperator[];
320
- editColumn: QueryBuilderOLAPGroupByColumnState | undefined;
325
+ windowColumns: QueryBuilderWindowColumnState[] = [];
326
+ operators: QueryBuilderTDS_WindowOperator[];
327
+ editColumn: QueryBuilderWindowColumnState | undefined;
321
328
 
322
329
  constructor(
323
330
  tdsState: QueryBuilderTDSState,
324
- operators: QueryBuilderTDS_OLAPOperator[],
331
+ operators: QueryBuilderTDS_WindowOperator[],
325
332
  ) {
326
333
  makeObservable(this, {
327
- olapColumns: observable,
334
+ windowColumns: observable,
328
335
  editColumn: observable,
329
- addOLAPColumn: action,
336
+ addWindowColumn: action,
330
337
  removeColumn: action,
331
338
  moveColumn: action,
332
339
  setEditColumn: action,
@@ -336,42 +343,42 @@ export class QueryBuilderOLAPGroupByState implements Hashable {
336
343
  }
337
344
 
338
345
  get isEmpty(): boolean {
339
- return !this.olapColumns.length;
346
+ return !this.windowColumns.length;
340
347
  }
341
348
 
342
349
  get referencedTDSColumns(): QueryBuilderTDSColumnState[] {
343
- return uniq(this.olapColumns.map((c) => c.referencedTDSColumns).flat());
350
+ return uniq(this.windowColumns.map((c) => c.referencedTDSColumns).flat());
344
351
  }
345
352
 
346
- setEditColumn(col: QueryBuilderOLAPGroupByColumnState | undefined): void {
353
+ setEditColumn(col: QueryBuilderWindowColumnState | undefined): void {
347
354
  this.editColumn = col;
348
355
  }
349
356
 
350
- findOperator(func: string): QueryBuilderTDS_OLAPOperator | undefined {
357
+ findOperator(func: string): QueryBuilderTDS_WindowOperator | undefined {
351
358
  return this.operators.find((o) => matchFunctionName(func, o.pureFunc));
352
359
  }
353
360
 
354
- addOLAPColumn(olapGroupByCol: QueryBuilderOLAPGroupByColumnState): void {
355
- addUniqueEntry(this.olapColumns, olapGroupByCol);
361
+ addWindowColumn(windowCol: QueryBuilderWindowColumnState): void {
362
+ addUniqueEntry(this.windowColumns, windowCol);
356
363
  }
357
364
 
358
- removeColumn(column: QueryBuilderOLAPGroupByColumnState): void {
359
- deleteEntry(this.olapColumns, column);
365
+ removeColumn(column: QueryBuilderWindowColumnState): void {
366
+ deleteEntry(this.windowColumns, column);
360
367
  }
361
368
 
362
369
  moveColumn(fromIndex: number, toIndex: number): void {
363
- const fromCol = this.olapColumns[fromIndex];
364
- const toCol = this.olapColumns[toIndex];
370
+ const fromCol = this.windowColumns[fromIndex];
371
+ const toCol = this.windowColumns[toIndex];
365
372
  if (fromCol && toCol) {
366
- this.olapColumns[fromIndex] = toCol;
367
- this.olapColumns[toIndex] = fromCol;
373
+ this.windowColumns[fromIndex] = toCol;
374
+ this.windowColumns[toIndex] = fromCol;
368
375
  }
369
376
  }
370
377
 
371
378
  get hashCode(): string {
372
379
  return hashArray([
373
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_STATE,
374
- hashArray(this.olapColumns),
380
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_STATE,
381
+ hashArray(this.windowColumns),
375
382
  ]);
376
383
  }
377
384
  }