@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
@@ -0,0 +1,91 @@
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 Type } from '@finos/legend-graph';
17
+ import { type Hashable } from '@finos/legend-shared';
18
+ import type { QueryBuilderProjectionColumnDragSource } from '../projection/QueryBuilderProjectionColumnState.js';
19
+ import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
20
+ import type { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
21
+ import type { COLUMN_SORT_TYPE } from '../QueryResultSetModifierState.js';
22
+ import type { QueryBuilderTDS_WindowOperator } from './operators/QueryBuilderTDS_WindowOperator.js';
23
+ export declare const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = "WINDOW_COLUMN";
24
+ export interface QueryBuilderWindowColumnDragSource {
25
+ columnState: QueryBuilderTDSColumnState;
26
+ }
27
+ export type QueryBuilderWindowDropTarget = QueryBuilderProjectionColumnDragSource | QueryBuilderWindowColumnDragSource;
28
+ export declare class WindowGroupByColumnSortByState implements Hashable {
29
+ columnState: QueryBuilderTDSColumnState;
30
+ sortType: COLUMN_SORT_TYPE;
31
+ constructor(columnState: QueryBuilderTDSColumnState, sortType: COLUMN_SORT_TYPE);
32
+ setColumnState(colState: QueryBuilderTDSColumnState): void;
33
+ setSortType(type: COLUMN_SORT_TYPE): void;
34
+ get hashCode(): string;
35
+ }
36
+ export declare abstract class QueryBuilderTDS_WindowOperatorState implements Hashable {
37
+ readonly windowState: QueryBuilderWindowState;
38
+ lambdaParameterName: string;
39
+ operator: QueryBuilderTDS_WindowOperator;
40
+ constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator);
41
+ setLambdaParameterName(paramName: string): void;
42
+ setOperator(val: QueryBuilderTDS_WindowOperator): void;
43
+ get hashCode(): string;
44
+ }
45
+ export declare class QueryBuilderTDS_WindowRankOperatorState extends QueryBuilderTDS_WindowOperatorState {
46
+ constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator);
47
+ }
48
+ export declare class QueryBuilderTDS_WindowAggreationOperatorState extends QueryBuilderTDS_WindowOperatorState {
49
+ columnState: QueryBuilderTDSColumnState;
50
+ constructor(windowState: QueryBuilderWindowState, operator: QueryBuilderTDS_WindowOperator, columnState: QueryBuilderTDSColumnState);
51
+ setColumnState(val: QueryBuilderTDSColumnState): void;
52
+ get hashCode(): string;
53
+ }
54
+ export declare class QueryBuilderWindowColumnState extends QueryBuilderTDSColumnState implements Hashable {
55
+ readonly windowState: QueryBuilderWindowState;
56
+ windowColumns: QueryBuilderTDSColumnState[];
57
+ sortByState: WindowGroupByColumnSortByState | undefined;
58
+ operationState: QueryBuilderTDS_WindowOperatorState;
59
+ columnName: string;
60
+ constructor(windowState: QueryBuilderWindowState, windowColumns: QueryBuilderTDSColumnState[], sortType: WindowGroupByColumnSortByState | undefined, operationState: QueryBuilderTDS_WindowOperatorState, columnName: string);
61
+ get columnWindowGroupIdx(): number;
62
+ get possibleReferencedColumns(): QueryBuilderTDSColumnState[];
63
+ get referencedTDSColumns(): QueryBuilderTDSColumnState[];
64
+ getColumnType(): Type | undefined;
65
+ setColumnName(val: string): void;
66
+ setOperatorState(op: QueryBuilderTDS_WindowOperatorState): void;
67
+ setSortBy(val: WindowGroupByColumnSortByState | undefined): void;
68
+ changeWindow(val: QueryBuilderTDSColumnState, idx: number): void;
69
+ addWindow(val: QueryBuilderTDSColumnState): void;
70
+ deleteWindow(val: QueryBuilderTDSColumnState): void;
71
+ possibleAggregatedColumns(op: QueryBuilderTDS_WindowOperator): QueryBuilderTDSColumnState[];
72
+ changeOperator(windowOp: QueryBuilderTDS_WindowOperator): void;
73
+ changeSortBy(sortOp: COLUMN_SORT_TYPE | undefined): void;
74
+ get hashCode(): string;
75
+ }
76
+ export declare class QueryBuilderWindowState implements Hashable {
77
+ readonly tdsState: QueryBuilderTDSState;
78
+ windowColumns: QueryBuilderWindowColumnState[];
79
+ operators: QueryBuilderTDS_WindowOperator[];
80
+ editColumn: QueryBuilderWindowColumnState | undefined;
81
+ constructor(tdsState: QueryBuilderTDSState, operators: QueryBuilderTDS_WindowOperator[]);
82
+ get isEmpty(): boolean;
83
+ get referencedTDSColumns(): QueryBuilderTDSColumnState[];
84
+ setEditColumn(col: QueryBuilderWindowColumnState | undefined): void;
85
+ findOperator(func: string): QueryBuilderTDS_WindowOperator | undefined;
86
+ addWindowColumn(windowCol: QueryBuilderWindowColumnState): void;
87
+ removeColumn(column: QueryBuilderWindowColumnState): void;
88
+ moveColumn(fromIndex: number, toIndex: number): void;
89
+ get hashCode(): string;
90
+ }
91
+ //# sourceMappingURL=QueryBuilderWindowState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowState.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqB,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,oDAAoD,CAAC;AACjH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAEpG,eAAO,MAA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AU,EAAE,6BAA6B,GAAG,SAAS,CAAC;gBAGpD,QAAQ,EAAE,oBAAoB,EAC9B,SAAS,EAAE,8BAA8B,EAAE;IAc7C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,oBAAoB,IAAI,0BAA0B,EAAE,CAEvD;IAED,aAAa,CAAC,GAAG,EAAE,6BAA6B,GAAG,SAAS,GAAG,IAAI;IAInE,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,8BAA8B,GAAG,SAAS;IAItE,eAAe,CAAC,SAAS,EAAE,6BAA6B,GAAG,IAAI;IAI/D,YAAY,CAAC,MAAM,EAAE,6BAA6B,GAAG,IAAI;IAIzD,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IASpD,IAAI,QAAQ,IAAI,MAAM,CAKrB;CACF"}
@@ -19,8 +19,8 @@ import { action, makeObservable, observable } from 'mobx';
19
19
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../graphManager/QueryBuilderHashUtils.js';
20
20
  import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../../../QueryBuilderConfig.js';
21
21
  import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
22
- export const QUERY_BUILDER_OLAP_COLUMN_DND_TYPE = 'OLAP_COLUMN';
23
- export class OLAPGroupByColumnSortByState {
22
+ export const QUERY_BUILDER_WINDOW_COLUMN_DND_TYPE = 'WINDOW_COLUMN';
23
+ export class WindowGroupByColumnSortByState {
24
24
  columnState;
25
25
  sortType;
26
26
  constructor(columnState, sortType) {
@@ -41,18 +41,18 @@ export class OLAPGroupByColumnSortByState {
41
41
  }
42
42
  get hashCode() {
43
43
  return hashArray([
44
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_COLUMN_SORTBY_STATE,
44
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_SORTBY_STATE,
45
45
  this.sortType,
46
46
  this.columnState.columnName,
47
47
  ]);
48
48
  }
49
49
  }
50
- export class QueryBuilderTDS_OLAPOperatorState {
51
- olapState;
50
+ export class QueryBuilderTDS_WindowOperatorState {
51
+ windowState;
52
52
  lambdaParameterName = DEFAULT_LAMBDA_VARIABLE_NAME;
53
53
  operator;
54
- constructor(olapState, operator) {
55
- this.olapState = olapState;
54
+ constructor(windowState, operator) {
55
+ this.windowState = windowState;
56
56
  this.operator = operator;
57
57
  }
58
58
  setLambdaParameterName(paramName) {
@@ -63,24 +63,24 @@ export class QueryBuilderTDS_OLAPOperatorState {
63
63
  }
64
64
  get hashCode() {
65
65
  return hashArray([
66
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_OPERATION_STATE,
66
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_OPERATION_STATE,
67
67
  this.lambdaParameterName,
68
68
  this.operator,
69
69
  ]);
70
70
  }
71
71
  }
72
- export class QueryBuilderTDS_OLAPRankOperatorState extends QueryBuilderTDS_OLAPOperatorState {
73
- constructor(olapState, operator) {
74
- super(olapState, operator);
72
+ export class QueryBuilderTDS_WindowRankOperatorState extends QueryBuilderTDS_WindowOperatorState {
73
+ constructor(windowState, operator) {
74
+ super(windowState, operator);
75
75
  makeObservable(this, {
76
76
  setLambdaParameterName: action,
77
77
  });
78
78
  }
79
79
  }
80
- export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS_OLAPOperatorState {
80
+ export class QueryBuilderTDS_WindowAggreationOperatorState extends QueryBuilderTDS_WindowOperatorState {
81
81
  columnState;
82
- constructor(olapState, operator, columnState) {
83
- super(olapState, operator);
82
+ constructor(windowState, operator, columnState) {
83
+ super(windowState, operator);
84
84
  makeObservable(this, {
85
85
  columnState: observable,
86
86
  setColumnState: action,
@@ -93,20 +93,20 @@ export class QueryBuilderTDS_OLAPAggreationOperatorState extends QueryBuilderTDS
93
93
  }
94
94
  get hashCode() {
95
95
  return hashArray([
96
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_AGG_OPERATION_STATE,
96
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_AGG_OPERATION_STATE,
97
97
  this.lambdaParameterName,
98
98
  this.operator,
99
99
  this.columnState.columnName,
100
100
  ]);
101
101
  }
102
102
  }
103
- export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnState {
104
- olapState;
103
+ export class QueryBuilderWindowColumnState extends QueryBuilderTDSColumnState {
104
+ windowState;
105
105
  windowColumns = [];
106
106
  sortByState;
107
107
  operationState;
108
108
  columnName;
109
- constructor(olapState, windowColumns, sortType, operationState, columnName) {
109
+ constructor(windowState, windowColumns, sortType, operationState, columnName) {
110
110
  super();
111
111
  makeObservable(this, {
112
112
  windowColumns: observable,
@@ -122,25 +122,26 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
122
122
  changeOperator: action,
123
123
  changeSortBy: action,
124
124
  });
125
- this.olapState = olapState;
125
+ this.windowState = windowState;
126
126
  this.windowColumns = windowColumns;
127
127
  this.sortByState = sortType;
128
128
  this.operationState = operationState;
129
129
  this.columnName = columnName;
130
130
  }
131
- get columnOLAPGroupIdx() {
132
- return this.olapState.olapColumns.findIndex((e) => e === this);
131
+ get columnWindowGroupIdx() {
132
+ return this.windowState.windowColumns.findIndex((e) => e === this);
133
133
  }
134
134
  get possibleReferencedColumns() {
135
- // column can only reference TDS columns already defined, i.e in an earlier index of the olap columns
136
- const idx = this.olapState.tdsState.tdsColumns.findIndex((e) => e === this);
135
+ // column can only reference TDS columns already defined, i.e in an earlier index of the window columns
136
+ const idx = this.windowState.tdsState.tdsColumns.findIndex((e) => e === this);
137
137
  if (idx === -1) {
138
- return this.olapState.tdsState.tdsColumns;
138
+ return this.windowState.tdsState.tdsColumns;
139
139
  }
140
- return this.olapState.tdsState.tdsColumns.slice(0, idx);
140
+ return this.windowState.tdsState.tdsColumns.slice(0, idx);
141
141
  }
142
142
  get referencedTDSColumns() {
143
- const operatorReference = this.operationState instanceof QueryBuilderTDS_OLAPAggreationOperatorState
143
+ const operatorReference = this.operationState instanceof
144
+ QueryBuilderTDS_WindowAggreationOperatorState
144
145
  ? [this.operationState.columnState]
145
146
  : [];
146
147
  const soryByReference = this.sortByState
@@ -149,7 +150,7 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
149
150
  return [...this.windowColumns, ...soryByReference, ...operatorReference];
150
151
  }
151
152
  getColumnType() {
152
- return this.operationState.operator.getOperatorReturnType(this.olapState.tdsState.queryBuilderState.graphManagerState.graph);
153
+ return this.operationState.operator.getOperatorReturnType(this.windowState.tdsState.queryBuilderState.graphManagerState.graph);
153
154
  }
154
155
  setColumnName(val) {
155
156
  this.columnName = val;
@@ -175,23 +176,24 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
175
176
  }
176
177
  return [];
177
178
  }
178
- changeOperator(olapOp) {
179
+ changeOperator(windowOp) {
179
180
  const currentOperator = this.operationState.operator;
180
- const currentAggregateColumn = this.operationState instanceof QueryBuilderTDS_OLAPAggreationOperatorState
181
+ const currentAggregateColumn = this.operationState instanceof
182
+ QueryBuilderTDS_WindowAggreationOperatorState
181
183
  ? this.operationState.columnState
182
184
  : undefined;
183
- if (currentOperator !== olapOp) {
184
- if (olapOp.isColumnAggregator()) {
185
+ if (currentOperator !== windowOp) {
186
+ if (windowOp.isColumnAggregator()) {
185
187
  const compatibleAggCol = currentAggregateColumn &&
186
- olapOp.isCompatibleWithColumn(currentAggregateColumn)
188
+ windowOp.isCompatibleWithColumn(currentAggregateColumn)
187
189
  ? currentAggregateColumn
188
- : this.possibleAggregatedColumns(olapOp)[0];
190
+ : this.possibleAggregatedColumns(windowOp)[0];
189
191
  if (compatibleAggCol) {
190
- this.setOperatorState(new QueryBuilderTDS_OLAPAggreationOperatorState(this.olapState, olapOp, compatibleAggCol));
192
+ this.setOperatorState(new QueryBuilderTDS_WindowAggreationOperatorState(this.windowState, windowOp, compatibleAggCol));
191
193
  }
192
194
  }
193
195
  else {
194
- this.setOperatorState(new QueryBuilderTDS_OLAPRankOperatorState(this.olapState, olapOp));
196
+ this.setOperatorState(new QueryBuilderTDS_WindowRankOperatorState(this.windowState, windowOp));
195
197
  }
196
198
  }
197
199
  }
@@ -200,7 +202,7 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
200
202
  if (sortByState?.sortType !== sortOp) {
201
203
  if (sortOp) {
202
204
  const sortInfoOpState = sortByState ??
203
- new OLAPGroupByColumnSortByState(guaranteeNonNullable(this.possibleReferencedColumns[0]), sortOp);
205
+ new WindowGroupByColumnSortByState(guaranteeNonNullable(this.possibleReferencedColumns[0]), sortOp);
204
206
  sortInfoOpState.setSortType(sortOp);
205
207
  this.setSortBy(sortInfoOpState);
206
208
  }
@@ -211,7 +213,7 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
211
213
  }
212
214
  get hashCode() {
213
215
  return hashArray([
214
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_COLUMN_STATE,
216
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_COLUMN_STATE,
215
217
  hashArray(this.windowColumns),
216
218
  this.sortByState ?? '',
217
219
  this.operationState,
@@ -219,16 +221,16 @@ export class QueryBuilderOLAPGroupByColumnState extends QueryBuilderTDSColumnSta
219
221
  ]);
220
222
  }
221
223
  }
222
- export class QueryBuilderOLAPGroupByState {
224
+ export class QueryBuilderWindowState {
223
225
  tdsState;
224
- olapColumns = [];
226
+ windowColumns = [];
225
227
  operators;
226
228
  editColumn;
227
229
  constructor(tdsState, operators) {
228
230
  makeObservable(this, {
229
- olapColumns: observable,
231
+ windowColumns: observable,
230
232
  editColumn: observable,
231
- addOLAPColumn: action,
233
+ addWindowColumn: action,
232
234
  removeColumn: action,
233
235
  moveColumn: action,
234
236
  setEditColumn: action,
@@ -237,10 +239,10 @@ export class QueryBuilderOLAPGroupByState {
237
239
  this.operators = operators;
238
240
  }
239
241
  get isEmpty() {
240
- return !this.olapColumns.length;
242
+ return !this.windowColumns.length;
241
243
  }
242
244
  get referencedTDSColumns() {
243
- return uniq(this.olapColumns.map((c) => c.referencedTDSColumns).flat());
245
+ return uniq(this.windowColumns.map((c) => c.referencedTDSColumns).flat());
244
246
  }
245
247
  setEditColumn(col) {
246
248
  this.editColumn = col;
@@ -248,25 +250,25 @@ export class QueryBuilderOLAPGroupByState {
248
250
  findOperator(func) {
249
251
  return this.operators.find((o) => matchFunctionName(func, o.pureFunc));
250
252
  }
251
- addOLAPColumn(olapGroupByCol) {
252
- addUniqueEntry(this.olapColumns, olapGroupByCol);
253
+ addWindowColumn(windowCol) {
254
+ addUniqueEntry(this.windowColumns, windowCol);
253
255
  }
254
256
  removeColumn(column) {
255
- deleteEntry(this.olapColumns, column);
257
+ deleteEntry(this.windowColumns, column);
256
258
  }
257
259
  moveColumn(fromIndex, toIndex) {
258
- const fromCol = this.olapColumns[fromIndex];
259
- const toCol = this.olapColumns[toIndex];
260
+ const fromCol = this.windowColumns[fromIndex];
261
+ const toCol = this.windowColumns[toIndex];
260
262
  if (fromCol && toCol) {
261
- this.olapColumns[fromIndex] = toCol;
262
- this.olapColumns[toIndex] = fromCol;
263
+ this.windowColumns[fromIndex] = toCol;
264
+ this.windowColumns[toIndex] = fromCol;
263
265
  }
264
266
  }
265
267
  get hashCode() {
266
268
  return hashArray([
267
- QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_GROUPBY_STATE,
268
- hashArray(this.olapColumns),
269
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_GROUPBY_STATE,
270
+ hashArray(this.windowColumns),
269
271
  ]);
270
272
  }
271
273
  }
272
- //# sourceMappingURL=QueryBuilderOLAPGroupByState.js.map
274
+ //# sourceMappingURL=QueryBuilderWindowState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowState.js","sourceRoot":"","sources":["../../../../../src/stores/fet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AE,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,aAAa,CAAC,GAA8C;QAC1D,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,eAAe,CAAC,SAAwC;QACtD,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAED,YAAY,CAAC,MAAqC;QAChD,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,OAAe;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,OAAO,IAAI,KAAK,EAAE;YACpB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YACtC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;SACvC;IACH,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,wBAAwB;YACrD,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -16,4 +16,4 @@
16
16
  import { LambdaFunction, SimpleFunctionExpression } from '@finos/legend-graph';
17
17
  import type { QueryBuilderState } from '../../../QueryBuilderState.js';
18
18
  export declare const processTDS_OLAPGroupByExpression: (expression: SimpleFunctionExpression, queryBuilderState: QueryBuilderState, parentLambda: LambdaFunction) => void;
19
- //# sourceMappingURL=QueryBuilderOLAPGroupByStateBuilder.d.ts.map
19
+ //# sourceMappingURL=QueryBuilderWindowStateBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowStateBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,cAAc,EAId,wBAAwB,EAEzB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAevE,eAAO,MAAM,gCAAgC,eAC/B,wBAAwB,qBACjB,iBAAiB,gBACtB,cAAc,KAC3B,IA0LF,CAAC"}
@@ -19,7 +19,7 @@ import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/Quer
19
19
  import { QueryBuilderValueSpecificationProcessor } from '../../../QueryBuilderStateBuilder.js';
20
20
  import { getTDSColumnState, getTDSColSortTypeFromFunctionName, } from '../QueryBuilderTDSHelper.js';
21
21
  import { QueryBuilderTDSState } from '../QueryBuilderTDSState.js';
22
- import { OLAPGroupByColumnSortByState, QueryBuilderOLAPGroupByColumnState, QueryBuilderTDS_OLAPAggreationOperatorState, QueryBuilderTDS_OLAPRankOperatorState, } from './QueryBuilderOLAPGroupByState.js';
22
+ import { WindowGroupByColumnSortByState, QueryBuilderWindowColumnState, QueryBuilderTDS_WindowAggreationOperatorState, QueryBuilderTDS_WindowRankOperatorState, } from './QueryBuilderWindowState.js';
23
23
  export const processTDS_OLAPGroupByExpression = (expression, queryBuilderState, parentLambda) => {
24
24
  // check parameters
25
25
  const parametersLength = expression.parametersValues.length;
@@ -63,7 +63,7 @@ export const processTDS_OLAPGroupByExpression = (expression, queryBuilderState,
63
63
  const colSortType = getTDSColSortTypeFromFunctionName(sortByFunctionName);
64
64
  const colSortVal = guaranteeIsString(guaranteeType(sortByExpression.parametersValues[0], PrimitiveInstanceValue, 'Can`t process OLAP sort column : OLAP sort column should be a primitive instance value').values[0], 'Can`t process OLAP sort column: OLAP sort column should be a string primitive instance value');
65
65
  const sortColState = getTDSColumnState(tdsState, colSortVal);
66
- sortByState = new OLAPGroupByColumnSortByState(sortColState, colSortType);
66
+ sortByState = new WindowGroupByColumnSortByState(sortColState, colSortType);
67
67
  }
68
68
  // process olap operation
69
69
  let operatorState;
@@ -77,8 +77,8 @@ export const processTDS_OLAPGroupByExpression = (expression, queryBuilderState,
77
77
  const operationLambda = guaranteeType(guaranteeType(olapOperationExpressionParams[1], LambdaFunctionInstanceValue).values[0], LambdaFunction);
78
78
  assertTrue(operationLambda.expressionSequence.length === 1);
79
79
  const operationFunctionExp = guaranteeType(operationLambda.expressionSequence[0], SimpleFunctionExpression);
80
- const operation = guaranteeNonNullable(tdsState.olapGroupByState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
81
- operatorState = new QueryBuilderTDS_OLAPAggreationOperatorState(tdsState.olapGroupByState, operation, oppColumnState);
80
+ const operation = guaranteeNonNullable(tdsState.windowState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
81
+ operatorState = new QueryBuilderTDS_WindowAggreationOperatorState(tdsState.windowState, operation, oppColumnState);
82
82
  operatorState.setLambdaParameterName(guaranteeType(operationLambda.functionType.parameters[0], VariableExpression, `Can't process olapGroupBy() operation lambda: only support olapGroupBy() operation lambda with 1 parameter of type 'VariableExpression'`).name);
83
83
  }
84
84
  else {
@@ -86,15 +86,15 @@ export const processTDS_OLAPGroupByExpression = (expression, queryBuilderState,
86
86
  .values[0], LambdaFunction);
87
87
  assertTrue(operationLambda.expressionSequence.length === 1);
88
88
  const operationFunctionExp = guaranteeType(operationLambda.expressionSequence[0], SimpleFunctionExpression);
89
- const operation = guaranteeNonNullable(tdsState.olapGroupByState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
89
+ const operation = guaranteeNonNullable(tdsState.windowState.findOperator(operationFunctionExp.functionName), `olapGroupBy() operator '${operationFunctionExp.functionName}' not supported`);
90
90
  assertTrue(!operation.isColumnAggregator(), `Operator '${operation.getLabel()}' expects a TDS column to aggregate against`);
91
- operatorState = new QueryBuilderTDS_OLAPRankOperatorState(tdsState.olapGroupByState, operation);
91
+ operatorState = new QueryBuilderTDS_WindowRankOperatorState(tdsState.windowState, operation);
92
92
  operatorState.setLambdaParameterName(guaranteeType(operationLambda.functionType.parameters[0], VariableExpression, `Can't process olapGroupBy() operation lambda: only support olapGroupBy() operation lambda with 1 parameter of type 'VariableExpression'`).name);
93
93
  }
94
94
  // main col
95
95
  const olapColumnValue = guaranteeIsString(guaranteeType(olapColumnExpression, PrimitiveInstanceValue, 'Can`t process OLAP column: OLAP column should be a primitive instance value').values[0], 'Can`t process OLAP column: OLAP column should be a string primitive instance value');
96
- const olapGroupByColumnState = new QueryBuilderOLAPGroupByColumnState(tdsState.olapGroupByState, windowColumns, sortByState, operatorState, olapColumnValue);
97
- tdsState.olapGroupByState.addOLAPColumn(olapGroupByColumnState);
98
- tdsState.setShowOlapGroupByPanel(true);
96
+ const olapGroupByColumnState = new QueryBuilderWindowColumnState(tdsState.windowState, windowColumns, sortByState, operatorState, olapColumnValue);
97
+ tdsState.windowState.addWindowColumn(olapGroupByColumnState);
98
+ tdsState.setShowWindowFuncPanel(true);
99
99
  };
100
- //# sourceMappingURL=QueryBuilderOLAPGroupByStateBuilder.js.map
100
+ //# sourceMappingURL=QueryBuilderWindowStateBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowStateBuilder.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,2BAA2B,EAC3B,iBAAiB,EACjB,sBAAsB,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ACP,CAAC;KACH;IAED,WAAW;IACX,MAAM,eAAe,GAAG,iBAAiB,CACvC,aAAa,CACX,oBAAoB,EACpB,sBAAsB,EACtB,6EAA6E,CAC9E,CAAC,MAAM,CAAC,CAAC,CAAC,EACX,oFAAoF,CACrF,CAAC;IACF,MAAM,sBAAsB,GAAG,IAAI,6BAA6B,CAC9D,QAAQ,CAAC,WAAW,EACpB,aAAa,EACb,WAAW,EACX,aAAa,EACb,eAAe,CAChB,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAC7D,QAAQ,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC,CAAC"}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { type LambdaFunction } from '@finos/legend-graph';
17
- import { type QueryBuilderOLAPGroupByState } from './QueryBuilderOLAPGroupByState.js';
18
- export declare const appendOLAPGroupByState: (olapGroupByState: QueryBuilderOLAPGroupByState, lambda: LambdaFunction) => LambdaFunction;
19
- //# sourceMappingURL=QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map
17
+ import { type QueryBuilderWindowState } from './QueryBuilderWindowState.js';
18
+ export declare const appendOLAPGroupByState: (olapGroupByState: QueryBuilderWindowState, lambda: LambdaFunction) => LambdaFunction;
19
+ //# sourceMappingURL=QueryBuilderWindowValueSpecificationBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowValueSpecificationBuilder.d.ts","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,cAAc,EAUpB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,8BAA8B,CAAC;AAkGtC,eAAO,MAAM,sBAAsB,qBACf,uBAAuB,UACjC,cAAc,KACrB,cAKF,CAAC"}
@@ -18,9 +18,9 @@ import { guaranteeNonNullable } from '@finos/legend-shared';
18
18
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../graphManager/QueryBuilderSupportedFunctions.js';
19
19
  import { buildGenericLambdaFunctionInstanceValue } from '../../../QueryBuilderValueSpecificationHelper.js';
20
20
  import { getFunctionNameFromTDSSortColumn } from '../QueryBuilderTDSHelper.js';
21
- import { QueryBuilderTDS_OLAPAggreationOperatorState, } from './QueryBuilderOLAPGroupByState.js';
21
+ import { QueryBuilderTDS_WindowAggreationOperatorState, } from './QueryBuilderWindowState.js';
22
22
  const appendOLAPGroupByColumnState = (olapGroupByColumnState, lambda) => {
23
- const graph = olapGroupByColumnState.olapState.tdsState.queryBuilderState
23
+ const graph = olapGroupByColumnState.windowState.tdsState.queryBuilderState
24
24
  .graphManagerState.graph;
25
25
  // create window cols expression
26
26
  const windowColumns = olapGroupByColumnState.windowColumns.map((column) => {
@@ -48,7 +48,7 @@ const appendOLAPGroupByColumnState = (olapGroupByColumnState, lambda) => {
48
48
  ];
49
49
  const olapLambdaFuncInstance = buildGenericLambdaFunctionInstanceValue(operationState.lambdaParameterName, [olapFuncExpression], graph);
50
50
  let olapAggregationExpression;
51
- if (operationState instanceof QueryBuilderTDS_OLAPAggreationOperatorState) {
51
+ if (operationState instanceof QueryBuilderTDS_WindowAggreationOperatorState) {
52
52
  // column param
53
53
  const olapAggregateColumn = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(PrimitiveType.STRING)));
54
54
  olapAggregateColumn.values = [operationState.columnState.columnName];
@@ -75,7 +75,7 @@ const appendOLAPGroupByColumnState = (olapGroupByColumnState, lambda) => {
75
75
  return lambda;
76
76
  };
77
77
  export const appendOLAPGroupByState = (olapGroupByState, lambda) => {
78
- olapGroupByState.olapColumns.forEach((c) => appendOLAPGroupByColumnState(c, lambda));
78
+ olapGroupByState.windowColumns.forEach((c) => appendOLAPGroupByColumnState(c, lambda));
79
79
  return lambda;
80
80
  };
81
- //# sourceMappingURL=QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map
81
+ //# sourceMappingURL=QueryBuilderWindowValueSpecificationBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderWindowValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,EACZ,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4DAA4D,CAAC;AAC/G,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAGL,6CAA6C,GAC9C,MAAM,8BAA8B,CAAC;AAEtC,MAAM,4BAA4B,GAAG,CACnC,sBAAqD,EACrD,MAAsB,EACN,EAAE;IAClB,MAAM,KAAK,GACT,sBAAsB,CAAC,WAAW,CAAC,QAAQ,CAAC,iBAAiB;SAC1D,iBAAiB,CAAC,KAAK,CAAC;IAE7B,gCAAgC;IAChC,MAAM,aAAa,GAAG,sBAAsB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACxE,MAAM,cAAc,GAAG,IAAI,sBAAsB,CAC/C,4BAA4B,CAAC,MAAM,CACjC,IAAI,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,CACtC,CACF,CAAC;QACF,cAAc,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,cAAc,CAAC;IACxB,C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CACpC,gBAAyC,EACzC,MAAsB,EACN,EAAE;IAClB,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAC3C,4BAA4B,CAAC,CAAC,EAAE,MAAM,CAAC,CACxC,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -16,7 +16,7 @@
16
16
  import { type PureModel, type Type } from '@finos/legend-graph';
17
17
  import { type Hashable } from '@finos/legend-shared';
18
18
  import type { QueryBuilderTDSColumnState } from '../../QueryBuilderTDSColumnState.js';
19
- export declare abstract class QueryBuilderTDS_OLAPOperator implements Hashable {
19
+ export declare abstract class QueryBuilderTDS_WindowOperator implements Hashable {
20
20
  readonly uuid: string;
21
21
  abstract getLabel(): string;
22
22
  abstract get hashCode(): string;
@@ -26,4 +26,4 @@ export declare abstract class QueryBuilderTDS_OLAPOperator implements Hashable {
26
26
  getOperatorReturnType(graph: PureModel): Type;
27
27
  isCompatibleWithColumn(column: QueryBuilderTDSColumnState): boolean;
28
28
  }
29
- //# sourceMappingURL=QueryBuilderTDS_OLAPOperator.d.ts.map
29
+ //# sourceMappingURL=QueryBuilderTDS_WindowOperator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderTDS_WindowOperator.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAEtF,8BAAsB,8BAA+B,YAAW,QAAQ;IACtE,QAAQ,CAAC,IAAI,SAAU;IAEvB,QAAQ,CAAC,QAAQ,IAAI,MAAM;IAE3B,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAEhC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAEhC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO;IAE9D,kBAAkB,IAAI,OAAO;IAI7B,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAI7C,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO;CAGpE"}
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { PrimitiveType } from '@finos/legend-graph';
17
17
  import { uuid } from '@finos/legend-shared';
18
- export class QueryBuilderTDS_OLAPOperator {
18
+ export class QueryBuilderTDS_WindowOperator {
19
19
  uuid = uuid();
20
20
  isColumnAggregator() {
21
21
  return false;
@@ -27,4 +27,4 @@ export class QueryBuilderTDS_OLAPOperator {
27
27
  return this.isCompatibleWithType(column.getColumnType());
28
28
  }
29
29
  }
30
- //# sourceMappingURL=QueryBuilderTDS_OLAPOperator.js.map
30
+ //# sourceMappingURL=QueryBuilderTDS_WindowOperator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderTDS_WindowOperator.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAiB,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,OAAgB,8BAA8B;IACzC,IAAI,GAAG,IAAI,EAAE,CAAC;IAUvB,kBAAkB;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qBAAqB,CAAC,KAAgB;QACpC,OAAO,aAAa,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,sBAAsB,CAAC,MAAkC;QACvD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF"}
@@ -0,0 +1,25 @@
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 Type } from '@finos/legend-graph';
17
+ import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
18
+ export declare class QueryBuilderTDS_WindowOperator_Average extends QueryBuilderTDS_WindowOperator {
19
+ isColumnAggregator(): boolean;
20
+ getLabel(): string;
21
+ get pureFunc(): string;
22
+ get hashCode(): string;
23
+ isCompatibleWithType(type: Type | undefined): boolean;
24
+ }
25
+ //# sourceMappingURL=QueryBuilderTDS_WindowOperator_Average.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderTDS_WindowOperator_Average.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,KAAK,IAAI,EAAkB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAIrF,qBAAa,sCAAuC,SAAQ,8BAA8B;IAC/E,kBAAkB,IAAI,OAAO;IAItC,QAAQ,IAAI,MAAM;IAGlB,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,IAAI,MAAM,CAIrB;IAED,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO;CAiBtD"}
@@ -15,10 +15,10 @@
15
15
  */
16
16
  import { hashArray } from '@finos/legend-shared';
17
17
  import { PRIMITIVE_TYPE } from '@finos/legend-graph';
18
- import { QueryBuilderTDS_OLAPOperator } from './QueryBuilderTDS_OLAPOperator.js';
18
+ import { QueryBuilderTDS_WindowOperator } from './QueryBuilderTDS_WindowOperator.js';
19
19
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../../../graphManager/QueryBuilderHashUtils.js';
20
20
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../../../graphManager/QueryBuilderSupportedFunctions.js';
21
- export class QueryBuilderTDS_OLAPOperator_Average extends QueryBuilderTDS_OLAPOperator {
21
+ export class QueryBuilderTDS_WindowOperator_Average extends QueryBuilderTDS_WindowOperator {
22
22
  isColumnAggregator() {
23
23
  return true;
24
24
  }
@@ -29,7 +29,9 @@ export class QueryBuilderTDS_OLAPOperator_Average extends QueryBuilderTDS_OLAPOp
29
29
  return QUERY_BUILDER_SUPPORTED_FUNCTIONS.AVERAGE;
30
30
  }
31
31
  get hashCode() {
32
- return hashArray([QUERY_BUILDER_HASH_STRUCTURE.TDS_OLAP_OPERATOR_AVERAGE]);
32
+ return hashArray([
33
+ QUERY_BUILDER_HASH_STRUCTURE.TDS_WINDOW_OPERATOR_AVERAGE,
34
+ ]);
33
35
  }
34
36
  isCompatibleWithType(type) {
35
37
  if (type) {
@@ -47,4 +49,4 @@ export class QueryBuilderTDS_OLAPOperator_Average extends QueryBuilderTDS_OLAPOp
47
49
  return true;
48
50
  }
49
51
  }
50
- //# sourceMappingURL=QueryBuilderTDS_OLAPOperator_Average.js.map
52
+ //# sourceMappingURL=QueryBuilderTDS_WindowOperator_Average.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderTDS_WindowOperator_Average.js","sourceRoot":"","sources":["../../../../../../src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAa,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAElH,MAAM,OAAO,sCAAuC,SAAQ,8BAA8B;IAC/E,kBAAkB;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,QAAQ;QACV,OAAO,iCAAiC,CAAC,OAAO,CAAC;IACnD,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,SAAS,CAAC;YACf,4BAA4B,CAAC,2BAA2B;SACzD,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,CAAC,IAAsB;QACzC,IAAI,IAAI,EAAE;YACR,OACE;gBACE,cAAc,CAAC,OAAO;gBACtB,cAAc,CAAC,MAAM;gBACrB,cAAc,CAAC,OAAO;gBACtB,cAAc,CAAC,OAAO;gBACtB,cAAc,CAAC,KAAK;gBACpB,cAAc,CAAC,IAAI;gBACnB,cAAc,CAAC,UAAU;gBACzB,cAAc,CAAC,QAAQ;aAE1B,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}