@finos/legend-query-builder 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +11 -2
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
  5. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
  6. package/lib/components/QueryBuilderConstantExpressionPanel.js +104 -0
  7. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
  8. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  9. package/lib/components/QueryBuilderDiffPanel.js +1 -2
  10. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  11. package/lib/components/QueryBuilderParametersPanel.d.ts +0 -9
  12. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  13. package/lib/components/QueryBuilderParametersPanel.js +10 -30
  14. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  16. package/lib/components/QueryBuilderPropertyExpressionEditor.js +60 -12
  17. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  18. package/lib/components/QueryBuilderSideBar.d.ts +2 -1
  19. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  20. package/lib/components/QueryBuilderSideBar.js +6 -14
  21. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  22. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  23. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +12 -18
  24. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  25. package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +2 -2
  26. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +1 -0
  27. package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.js → QueryBuilderOLAPGroupByPanel.js} +2 -2
  28. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +1 -0
  29. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  30. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +9 -11
  31. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  32. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +1 -1
  33. package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
  34. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  35. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
  36. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  37. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  38. package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
  39. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  40. package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
  41. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  42. package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
  43. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  44. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  45. package/lib/components/shared/LambdaEditor.js +1 -15
  46. package/lib/components/shared/LambdaEditor.js.map +1 -1
  47. package/lib/components/shared/QueryBuilderVariableSelector.d.ts +36 -0
  48. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
  49. package/lib/components/shared/QueryBuilderVariableSelector.js +50 -0
  50. package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
  51. package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
  52. package/lib/components/watermark/QueryBuilderWatermark.js +9 -11
  53. package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
  54. package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -0
  55. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
  56. package/lib/graphManager/QueryBuilderHashUtils.js +2 -0
  57. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
  58. package/lib/index.css +17 -1
  59. package/lib/index.css.map +1 -1
  60. package/lib/package.json +8 -8
  61. package/lib/stores/QueryBuilderConfig.d.ts +1 -0
  62. package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
  63. package/lib/stores/QueryBuilderConfig.js +1 -0
  64. package/lib/stores/QueryBuilderConfig.js.map +1 -1
  65. package/lib/stores/QueryBuilderConstantsState.d.ts +43 -0
  66. package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -0
  67. package/lib/stores/QueryBuilderConstantsState.js +116 -0
  68. package/lib/stores/QueryBuilderConstantsState.js.map +1 -0
  69. package/lib/stores/QueryBuilderParametersState.d.ts +0 -4
  70. package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
  71. package/lib/stores/QueryBuilderParametersState.js +0 -1
  72. package/lib/stores/QueryBuilderParametersState.js.map +1 -1
  73. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +3 -10
  74. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  75. package/lib/stores/QueryBuilderPropertyEditorState.js +6 -140
  76. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  77. package/lib/stores/QueryBuilderResultState.d.ts +1 -2
  78. package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
  79. package/lib/stores/QueryBuilderResultState.js +7 -12
  80. package/lib/stores/QueryBuilderResultState.js.map +1 -1
  81. package/lib/stores/QueryBuilderState.d.ts +9 -3
  82. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  83. package/lib/stores/QueryBuilderState.js +19 -4
  84. package/lib/stores/QueryBuilderState.js.map +1 -1
  85. package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
  86. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
  87. package/lib/stores/QueryBuilderStateBuilder.js +50 -42
  88. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  89. package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
  90. package/lib/stores/QueryBuilderValueSpecificationBuilder.js +32 -29
  91. package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
  92. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
  93. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
  94. package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
  95. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  96. package/lib/stores/QueryBuilderValueSpecificationHelper.js +4 -20
  97. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  98. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
  99. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
  100. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
  101. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
  102. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -1
  103. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  104. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
  105. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  106. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
  107. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
  108. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
  109. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
  110. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
  111. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
  112. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
  113. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
  114. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
  115. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
  116. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
  117. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
  118. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
  119. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
  120. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
  121. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
  122. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
  123. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
  124. package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
  125. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
  126. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
  127. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
  128. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
  129. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  130. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
  131. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  132. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
  133. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  134. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
  135. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
  136. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
  137. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
  138. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
  139. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
  140. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
  141. package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
  142. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
  143. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
  144. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
  145. package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
  146. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
  147. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
  148. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
  149. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
  150. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
  151. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
  152. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
  153. package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
  154. package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +6 -2
  155. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
  156. package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +20 -20
  157. package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
  158. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
  159. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
  160. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
  161. package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
  162. package/lib/stores/shared/LambdaParameterState.d.ts +14 -2
  163. package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
  164. package/lib/stores/shared/LambdaParameterState.js +79 -6
  165. package/lib/stores/shared/LambdaParameterState.js.map +1 -1
  166. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
  167. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  168. package/lib/stores/shared/ValueSpecificationEditorHelper.js +58 -2
  169. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  170. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
  171. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
  172. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
  173. package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
  174. package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
  175. package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
  176. package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
  177. package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
  178. package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
  179. package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
  180. package/package.json +15 -15
  181. package/src/components/QueryBuilder.tsx +38 -0
  182. package/src/components/QueryBuilderConstantExpressionPanel.tsx +284 -0
  183. package/src/components/QueryBuilderDiffPanel.tsx +0 -2
  184. package/src/components/QueryBuilderParametersPanel.tsx +24 -110
  185. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
  186. package/src/components/QueryBuilderSideBar.tsx +5 -22
  187. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
  188. package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
  189. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
  190. package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
  191. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
  192. package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
  193. package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
  194. package/src/components/shared/LambdaEditor.tsx +0 -15
  195. package/src/components/shared/QueryBuilderVariableSelector.tsx +186 -0
  196. package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
  197. package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
  198. package/src/stores/QueryBuilderConfig.ts +1 -0
  199. package/src/stores/QueryBuilderConstantsState.ts +173 -0
  200. package/src/stores/QueryBuilderParametersState.ts +0 -6
  201. package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
  202. package/src/stores/QueryBuilderResultState.ts +19 -17
  203. package/src/stores/QueryBuilderState.ts +25 -4
  204. package/src/stores/QueryBuilderStateBuilder.ts +111 -52
  205. package/src/stores/QueryBuilderValueSpecificationBuilder.ts +48 -58
  206. package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
  207. package/src/stores/QueryBuilderValueSpecificationHelper.ts +10 -29
  208. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
  209. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +2 -2
  210. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
  211. package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
  212. package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
  213. package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
  214. package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
  215. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
  216. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
  217. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
  218. package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
  219. package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
  220. package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
  221. package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
  222. package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
  223. package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +55 -39
  224. package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
  225. package/src/stores/shared/LambdaParameterState.ts +151 -10
  226. package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
  227. package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
  228. package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
  229. package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
  230. package/tsconfig.json +14 -6
  231. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
  232. package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
  233. package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
  234. package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
  235. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
  236. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
  237. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
  238. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
  239. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
  240. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
  241. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
  242. package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
@@ -0,0 +1,93 @@
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 { PROCESSING_DATE_MILESTONING_PROPERTY_NAME, BUSINESS_DATE_MILESTONING_PROPERTY_NAME, AbstractPropertyExpression, MILESTONING_STEREOTYPE, INTERNAL__PropagatedValue, } from '@finos/legend-graph';
17
+ import { assertTrue, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
18
+ import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
19
+ import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
20
+ export class QueryBuilderBitemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
21
+ getMilestoningDate(index) {
22
+ if (index === 0) {
23
+ return this.milestoningState.processingDate;
24
+ }
25
+ else {
26
+ return this.milestoningState.businessDate;
27
+ }
28
+ }
29
+ getMilestoningToolTipText() {
30
+ return `Processing Date: ${getParameterValue(this.getMilestoningDate(0))}, Business Date: ${getParameterValue(this.getMilestoningDate(1))}`;
31
+ }
32
+ initializeMilestoningParameters(force) {
33
+ if (!this.milestoningState.processingDate || force) {
34
+ this.milestoningState.setProcessingDate(this.milestoningState.buildMilestoningParameter(PROCESSING_DATE_MILESTONING_PROPERTY_NAME));
35
+ }
36
+ if (!this.milestoningState.businessDate || force) {
37
+ this.milestoningState.setBusinessDate(this.milestoningState.buildMilestoningParameter(BUSINESS_DATE_MILESTONING_PROPERTY_NAME));
38
+ }
39
+ }
40
+ processGetAllParamaters(parameterValues) {
41
+ assertTrue(parameterValues.length === 3, `Can't process getAll() expression: when used with a bitemporal milestoned class getAll() expects two parameters`);
42
+ this.milestoningState.setProcessingDate(parameterValues[1]);
43
+ this.milestoningState.setBusinessDate(parameterValues[2]);
44
+ }
45
+ buildGetAllParameters(getAllFunction) {
46
+ getAllFunction.parametersValues.push(guaranteeNonNullable(this.getMilestoningDate(0), `Milestoning class should have a parameter of type 'Date'`));
47
+ getAllFunction.parametersValues.push(guaranteeNonNullable(this.getMilestoningDate(1), `Milestoning class should have a parameter of type 'Date'`));
48
+ }
49
+ generateMilestoningDate(isDatePropagationSupported, hasDefaultMilestoningDate, prevPropertyExpression, temporalSource, idx, derivedPropertyExpressionState) {
50
+ this.initializeMilestoningParameters();
51
+ if (idx === 0) {
52
+ if (temporalSource === MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL &&
53
+ derivedPropertyExpressionState?.parameterValues.length === 1) {
54
+ return new INTERNAL__PropagatedValue(() => guaranteeNonNullable(guaranteeType(prevPropertyExpression, AbstractPropertyExpression)
55
+ .parametersValues[1]));
56
+ }
57
+ let parameter;
58
+ if (isDatePropagationSupported &&
59
+ prevPropertyExpression &&
60
+ !hasDefaultMilestoningDate) {
61
+ parameter = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(prevPropertyExpression.parametersValues[1]));
62
+ }
63
+ else {
64
+ parameter = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(this.getMilestoningDate(idx)));
65
+ parameter.isPropagatedValue = hasDefaultMilestoningDate
66
+ ? false
67
+ : isDatePropagationSupported;
68
+ }
69
+ return parameter;
70
+ }
71
+ else {
72
+ if (temporalSource === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL &&
73
+ derivedPropertyExpressionState?.parameterValues.length === 1) {
74
+ return new INTERNAL__PropagatedValue(() => guaranteeNonNullable(guaranteeType(derivedPropertyExpressionState.propertyExpression
75
+ .parametersValues[0], AbstractPropertyExpression).parametersValues[1]));
76
+ }
77
+ let parameter;
78
+ if (isDatePropagationSupported &&
79
+ prevPropertyExpression &&
80
+ !hasDefaultMilestoningDate) {
81
+ parameter = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(prevPropertyExpression.parametersValues[2]));
82
+ }
83
+ else {
84
+ parameter = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(this.getMilestoningDate(idx)));
85
+ parameter.isPropagatedValue = hasDefaultMilestoningDate
86
+ ? false
87
+ : isDatePropagationSupported;
88
+ }
89
+ return parameter;
90
+ }
91
+ }
92
+ }
93
+ //# sourceMappingURL=QueryBuilderBitemporalMilestoningImplementation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderBitemporalMilestoningImplementation.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,yCAAyC,EACzC,uCAAuC,EAEvC,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,qCAAq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M,KAAK,CAAC,EAC5D;gBACA,OAAO,IAAI,yBAAyB,CAAC,GAAG,EAAE,CACxC,oBAAoB,CAClB,aAAa,CACX,8BAA8B,CAAC,kBAAkB;qBAC9C,gBAAgB,CAAC,CAAC,CAAC,EACtB,0BAA0B,CAC3B,CAAC,gBAAgB,CAAC,CAAC,CAAC,CACtB,CACF,CAAC;aACH;YACD,IAAI,SAAS,CAAC;YACd,IACE,0BAA0B;gBAC1B,sBAAsB;gBACtB,CAAC,yBAAyB,EAC1B;gBACA,SAAS,GAAG,IAAI,yBAAyB,CAAC,GAAG,EAAE,CAC7C,oBAAoB,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACjE,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,IAAI,yBAAyB,CAAC,GAAG,EAAE,CAC7C,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CACnD,CAAC;gBACF,SAAS,CAAC,iBAAiB,GAAG,yBAAyB;oBACrD,CAAC,CAAC,KAAK;oBACP,CAAC,CAAC,0BAA0B,CAAC;aAChC;YACD,OAAO,SAAS,CAAC;SAClB;IACH,CAAC;CACF"}
@@ -0,0 +1,26 @@
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 ValueSpecification, type SimpleFunctionExpression, type AbstractPropertyExpression, MILESTONING_STEREOTYPE } from '@finos/legend-graph';
17
+ import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
18
+ export declare class QueryBuilderBusinessTemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
19
+ getMilestoningDate(): ValueSpecification | undefined;
20
+ getMilestoningToolTipText(): string;
21
+ initializeMilestoningParameters(force?: boolean): void;
22
+ processGetAllParamaters(parameterValues: ValueSpecification[]): void;
23
+ buildGetAllParameters(getAllFunction: SimpleFunctionExpression): void;
24
+ generateMilestoningDate(isDatePropagationSupported: boolean, hasDefaultMilestoningDate: boolean, prevPropertyExpression: AbstractPropertyExpression | undefined, temporalSource: MILESTONING_STEREOTYPE | undefined): ValueSpecification;
25
+ }
26
+ //# sourceMappingURL=QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderBusinessTemporalMilestoningImplementation.d.ts","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,sBAAsB,EAEvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,qBAAa,qDAAsD,SAAQ,qCAAqC;IAC9G,kBAAkB,IAAI,kBAAkB,GAAG,SAAS;IAIpD,yBAAyB,IAAI,MAAM;IAInC,+BAA+B,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;IAUtD,uBAAuB,CAAC,eAAe,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAQpE,qBAAqB,CAAC,cAAc,EAAE,wBAAwB,GAAG,IAAI;IASrE,uBAAuB,CACrB,0BAA0B,EAAE,OAAO,EACnC,yBAAyB,EAAE,OAAO,EAClC,sBAAsB,EAAE,0BAA0B,GAAG,SAAS,EAC9D,cAAc,EAAE,sBAAsB,GAAG,SAAS,GACjD,kBAAkB;CA0BtB"}
@@ -0,0 +1,60 @@
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 { BUSINESS_DATE_MILESTONING_PROPERTY_NAME, MILESTONING_STEREOTYPE, INTERNAL__PropagatedValue, } from '@finos/legend-graph';
17
+ import { assertTrue, guaranteeNonNullable } from '@finos/legend-shared';
18
+ import { getParameterValue } from '../../components/QueryBuilderSideBar.js';
19
+ import { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
20
+ export class QueryBuilderBusinessTemporalMilestoningImplementation extends QueryBuilderMilestoningImplementation {
21
+ getMilestoningDate() {
22
+ return this.milestoningState.businessDate;
23
+ }
24
+ getMilestoningToolTipText() {
25
+ return `Business Date: ${getParameterValue(this.getMilestoningDate())}`;
26
+ }
27
+ initializeMilestoningParameters(force) {
28
+ if (!this.milestoningState.businessDate || force) {
29
+ this.milestoningState.setBusinessDate(this.milestoningState.buildMilestoningParameter(BUSINESS_DATE_MILESTONING_PROPERTY_NAME));
30
+ }
31
+ }
32
+ processGetAllParamaters(parameterValues) {
33
+ assertTrue(parameterValues.length === 2, `Can't process getAll() expression: when used with a milestoned class getAll() expects a parameter`);
34
+ this.milestoningState.setBusinessDate(parameterValues[1]);
35
+ }
36
+ buildGetAllParameters(getAllFunction) {
37
+ getAllFunction.parametersValues.push(guaranteeNonNullable(this.getMilestoningDate(), `Milestoning class should have a parameter of type 'Date'`));
38
+ }
39
+ generateMilestoningDate(isDatePropagationSupported, hasDefaultMilestoningDate, prevPropertyExpression, temporalSource) {
40
+ this.initializeMilestoningParameters();
41
+ if (isDatePropagationSupported &&
42
+ prevPropertyExpression &&
43
+ !hasDefaultMilestoningDate) {
44
+ if (temporalSource === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
45
+ return new INTERNAL__PropagatedValue(() => guaranteeNonNullable(prevPropertyExpression.parametersValues[1]));
46
+ }
47
+ else {
48
+ return new INTERNAL__PropagatedValue(() => guaranteeNonNullable(prevPropertyExpression.parametersValues[2]));
49
+ }
50
+ }
51
+ else {
52
+ const milestoningDate = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(this.getMilestoningDate()));
53
+ milestoningDate.isPropagatedValue = hasDefaultMilestoningDate
54
+ ? false
55
+ : isDatePropagationSupported;
56
+ return milestoningDate;
57
+ }
58
+ }
59
+ }
60
+ //# sourceMappingURL=QueryBuilderBusinessTemporalMilestoningImplementation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderBusinessTemporalMilestoningImplementation.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,uCAAuC,EAGvC,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAEnG,MAAM,OAAO,qDAAsD,SAAQ,qCAAqC;IAC9G,kBAAkB;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED,yBAAyB;QACvB,OAAO,kBAAkB,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,EAAE,CAAC;IAC1E,CAAC;IAED,+BAA+B,CAAC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,CAAC,KAAK;gBACP,CAAC,CAAC,0BAA0B,CAAC;YAC/B,OAAO,eAAe,CAAC;SACxB;IACH,CAAC;CACF"}
@@ -0,0 +1,70 @@
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 { AbstractPropertyExpression, DerivedProperty, MILESTONING_STEREOTYPE, type ValueSpecification, type PureModel } from '@finos/legend-graph';
17
+ import type { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
18
+ import type { QueryBuilderDerivedPropertyExpressionState } from '../QueryBuilderPropertyEditorState.js';
19
+ import type { QueryBuilderState } from '../QueryBuilderState.js';
20
+ export declare const getDerivedPropertyMilestoningSteoreotype: (property: DerivedProperty, graph: PureModel) => MILESTONING_STEREOTYPE | undefined;
21
+ /**
22
+ * Checks if the provided property expression match the criteria for default
23
+ * date propagation so we know whether we need to fill in values for the parameter
24
+ * or just propgate values from the parent's expression
25
+ *
26
+ * NOTE: this takes date propgation into account. See the table below for all
27
+ * the combination:
28
+ *
29
+ * | [source] | | | | |
30
+ * ----------------------------------------------------------------------
31
+ * [target] | | NONE | PR_TMP | BI_TMP | BU_TMP |
32
+ * ----------------------------------------------------------------------
33
+ * | NONE | N.A. | PRD | PRD,BUD | BUD |
34
+ * ----------------------------------------------------------------------
35
+ * | PR_TMP | N.A. | X | PRD,BUD | BUD |
36
+ * ----------------------------------------------------------------------
37
+ * | BI_TMP | N.A. | X | X | X |
38
+ * ----------------------------------------------------------------------
39
+ * | BU_TMP | N.A. | PRD | PRD,BUD | X |
40
+ * ----------------------------------------------------------------------
41
+ *
42
+ * Annotations:
43
+ *
44
+ * [source]: source temporal type
45
+ * [target]: target temporal type
46
+ *
47
+ * PR_TMP : processing temporal
48
+ * BI_TMP : bitemporal
49
+ * BU_TMP : business temporal
50
+ *
51
+ * X : no default date propagated
52
+ * PRD : default processing date is propagated
53
+ * BUD : default business date is propgated
54
+ */
55
+ export declare const isDefaultDatePropagationSupported: (currentPropertyExpression: AbstractPropertyExpression, queryBuilderState: QueryBuilderState, prevPropertyExpression?: AbstractPropertyExpression | undefined) => boolean;
56
+ /**
57
+ * Check if the parameter value of the milestoned property is
58
+ * the same as those specified in global scope, so that we can
59
+ * potentially replace them with propgated value.
60
+ */
61
+ export declare const matchMilestoningParameterValue: (stereotype: MILESTONING_STEREOTYPE, idx: number, parameterValue: ValueSpecification, milestoningDate: QueryBuilderMilestoningState) => boolean;
62
+ /**
63
+ * Generate a parameter value for the derived property given the index if the property is milestoned.
64
+ *
65
+ * This method considers different scenarios for milestoning and take into account date propagation
66
+ * See https://github.com/finos/legend-studio/pull/891
67
+ */
68
+ export declare const generateMilestonedPropertyParameterValue: (derivedPropertyExpressionState: QueryBuilderDerivedPropertyExpressionState, idx: number) => ValueSpecification | undefined;
69
+ export declare const validateMilestoningPropertyExpressionChain: (sourceStereotype: MILESTONING_STEREOTYPE | undefined, targetStereotype: MILESTONING_STEREOTYPE, propertyExpression: AbstractPropertyExpression) => void;
70
+ //# sourceMappingURL=QueryBuilderMilestoningHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderMilestoningHelper.d.ts","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAEf,sBAAsB,EAEtB,KAAK,kBAAkB,EAKvB,KAAK,SAAS,EAEf,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AACxG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,eAAO,MAAM,wCAAwC,aACzC,eAAe,SAClB,SAAS,KACf,sBAAsB,GAAG,SAiB3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,iCAAiC,8BACjB,0BAA0B,qBAClC,iBAAiB,2BACX,0BAA0B,GAAG,SAAS,KAC9D,OAkCF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,eAC7B,sBAAsB,OAC7B,MAAM,kBACK,kBAAkB,mBACjB,4BAA4B,KAC5C,OA2CF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wCAAwC,mCACnB,0CAA0C,OACrE,MAAM,KACV,kBAAkB,GAAG,SA6EvB,CAAC;AAEF,eAAO,MAAM,0CAA0C,qBACnC,sBAAsB,GAAG,SAAS,oBAClC,sBAAsB,sBACpB,0BAA0B,KAC7C,IA4BF,CAAC"}
@@ -0,0 +1,199 @@
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 { AbstractPropertyExpression, DerivedProperty, Class, MILESTONING_STEREOTYPE, getMilestoneTemporalStereotype, Association, getGeneratedMilestonedPropertiesForAssociation, PrimitiveInstanceValue, PRIMITIVE_TYPE, VariableExpression, } from '@finos/legend-graph';
17
+ import { guaranteeNonNullable, guaranteeType, UnsupportedOperationError, } from '@finos/legend-shared';
18
+ export const getDerivedPropertyMilestoningSteoreotype = (property, graph) => {
19
+ const owner = property._OWNER;
20
+ if (owner instanceof Class) {
21
+ return getMilestoneTemporalStereotype(owner, graph);
22
+ }
23
+ else if (owner instanceof Association) {
24
+ const generatedMilestonedProperties = getGeneratedMilestonedPropertiesForAssociation(owner, property);
25
+ if (generatedMilestonedProperties.length) {
26
+ const ownerClass = generatedMilestonedProperties[0]?.genericType.value.rawType;
27
+ return getMilestoneTemporalStereotype(guaranteeType(ownerClass, Class), graph);
28
+ }
29
+ }
30
+ return undefined;
31
+ };
32
+ /**
33
+ * Checks if the provided property expression match the criteria for default
34
+ * date propagation so we know whether we need to fill in values for the parameter
35
+ * or just propgate values from the parent's expression
36
+ *
37
+ * NOTE: this takes date propgation into account. See the table below for all
38
+ * the combination:
39
+ *
40
+ * | [source] | | | | |
41
+ * ----------------------------------------------------------------------
42
+ * [target] | | NONE | PR_TMP | BI_TMP | BU_TMP |
43
+ * ----------------------------------------------------------------------
44
+ * | NONE | N.A. | PRD | PRD,BUD | BUD |
45
+ * ----------------------------------------------------------------------
46
+ * | PR_TMP | N.A. | X | PRD,BUD | BUD |
47
+ * ----------------------------------------------------------------------
48
+ * | BI_TMP | N.A. | X | X | X |
49
+ * ----------------------------------------------------------------------
50
+ * | BU_TMP | N.A. | PRD | PRD,BUD | X |
51
+ * ----------------------------------------------------------------------
52
+ *
53
+ * Annotations:
54
+ *
55
+ * [source]: source temporal type
56
+ * [target]: target temporal type
57
+ *
58
+ * PR_TMP : processing temporal
59
+ * BI_TMP : bitemporal
60
+ * BU_TMP : business temporal
61
+ *
62
+ * X : no default date propagated
63
+ * PRD : default processing date is propagated
64
+ * BUD : default business date is propgated
65
+ */
66
+ export const isDefaultDatePropagationSupported = (currentPropertyExpression, queryBuilderState, prevPropertyExpression) => {
67
+ const property = currentPropertyExpression.func.value;
68
+ const graph = queryBuilderState.graphManagerState.graph;
69
+ // Default date propagation is not supported for current expression when the previous property expression is a derived property.
70
+ if (prevPropertyExpression &&
71
+ prevPropertyExpression.func.value instanceof DerivedProperty &&
72
+ prevPropertyExpression.func.value._OWNER.derivedProperties.includes(prevPropertyExpression.func.value)) {
73
+ return false;
74
+ }
75
+ if (property.genericType.value.rawType instanceof Class) {
76
+ // the stereotype of source class of current property expression.
77
+ const sourceStereotype = property instanceof DerivedProperty
78
+ ? getDerivedPropertyMilestoningSteoreotype(property, graph)
79
+ : undefined;
80
+ // Default date propagation is always supported if the source is `bitemporal`
81
+ if (sourceStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
82
+ return true;
83
+ }
84
+ // the stereotype (if exists) of the generic type of current property expression.
85
+ const targetStereotype = getMilestoneTemporalStereotype(property.genericType.value.rawType, graph);
86
+ // Default date propagation is supported when stereotype of both source and target matches
87
+ if (sourceStereotype && targetStereotype) {
88
+ return sourceStereotype === targetStereotype;
89
+ }
90
+ }
91
+ return false;
92
+ };
93
+ /**
94
+ * Check if the parameter value of the milestoned property is
95
+ * the same as those specified in global scope, so that we can
96
+ * potentially replace them with propgated value.
97
+ */
98
+ export const matchMilestoningParameterValue = (stereotype, idx, parameterValue, milestoningDate) => {
99
+ const checkIfEquivalent = (param1, param2) => {
100
+ if (param1 instanceof VariableExpression &&
101
+ param2 instanceof VariableExpression) {
102
+ return param1.name === param2.name;
103
+ }
104
+ else if (param1 instanceof PrimitiveInstanceValue &&
105
+ param2 instanceof PrimitiveInstanceValue) {
106
+ if (param1.genericType.value.rawType.name === PRIMITIVE_TYPE.LATESTDATE &&
107
+ param2.genericType.value.rawType.name === PRIMITIVE_TYPE.LATESTDATE) {
108
+ return true;
109
+ }
110
+ return (param1.genericType.value.rawType.name ===
111
+ param2.genericType.value.rawType.name &&
112
+ param1.values[0] === param2.values[0]);
113
+ }
114
+ return false;
115
+ };
116
+ switch (stereotype) {
117
+ case MILESTONING_STEREOTYPE.BITEMPORAL:
118
+ return ((idx === 0 &&
119
+ checkIfEquivalent(parameterValue, milestoningDate.processingDate)) ||
120
+ (idx === 1 &&
121
+ checkIfEquivalent(parameterValue, milestoningDate.businessDate)));
122
+ case MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL:
123
+ return checkIfEquivalent(parameterValue, milestoningDate.processingDate);
124
+ case MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL:
125
+ return checkIfEquivalent(parameterValue, milestoningDate.businessDate);
126
+ default:
127
+ }
128
+ return false;
129
+ };
130
+ /**
131
+ * Generate a parameter value for the derived property given the index if the property is milestoned.
132
+ *
133
+ * This method considers different scenarios for milestoning and take into account date propagation
134
+ * See https://github.com/finos/legend-studio/pull/891
135
+ */
136
+ export const generateMilestonedPropertyParameterValue = (derivedPropertyExpressionState, idx) => {
137
+ // Milestoning transformations should not be done on actual derived properties.
138
+ if (derivedPropertyExpressionState.derivedProperty._OWNER.derivedProperties.includes(derivedPropertyExpressionState.derivedProperty)) {
139
+ return undefined;
140
+ }
141
+ const prevPropertyExpression = derivedPropertyExpressionState.propertyExpression
142
+ .parametersValues[0] instanceof AbstractPropertyExpression
143
+ ? derivedPropertyExpressionState.propertyExpression.parametersValues[0]
144
+ : undefined;
145
+ const milestoningState = derivedPropertyExpressionState.queryBuilderState.milestoningState;
146
+ const temporalSource = getDerivedPropertyMilestoningSteoreotype(derivedPropertyExpressionState.derivedProperty, derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph);
147
+ const temporalTarget = derivedPropertyExpressionState.propertyExpression.func.value.genericType
148
+ .value.rawType instanceof Class &&
149
+ derivedPropertyExpressionState.propertyExpression.func.value._OWNER
150
+ ._generatedMilestonedProperties.length !== 0
151
+ ? getMilestoneTemporalStereotype(derivedPropertyExpressionState.propertyExpression.func.value
152
+ .genericType.value.rawType, derivedPropertyExpressionState.queryBuilderState.graphManagerState
153
+ .graph)
154
+ : undefined;
155
+ const hasDefaultMilestoningDate = temporalTarget &&
156
+ idx < derivedPropertyExpressionState.parameterValues.length &&
157
+ matchMilestoningParameterValue(temporalTarget, idx, guaranteeNonNullable(derivedPropertyExpressionState.parameterValues[idx]), milestoningState);
158
+ const shouldReturnMilestoningParameter = temporalTarget &&
159
+ ((idx < derivedPropertyExpressionState.parameterValues.length &&
160
+ (hasDefaultMilestoningDate ||
161
+ /**
162
+ * Checks if the given milestoning needs to be overwritten or not.
163
+ * Specially, we would need to rewrite the query if the user passes a single parameter
164
+ * to the `bitemporal` property expression with `processing temporal` source.
165
+ */
166
+ (getDerivedPropertyMilestoningSteoreotype(derivedPropertyExpressionState.derivedProperty, derivedPropertyExpressionState.queryBuilderState.graphManagerState
167
+ .graph) === MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL &&
168
+ temporalTarget === MILESTONING_STEREOTYPE.BITEMPORAL &&
169
+ derivedPropertyExpressionState.parameterValues.length === 1))) ||
170
+ idx >= derivedPropertyExpressionState.parameterValues.length);
171
+ if (!shouldReturnMilestoningParameter) {
172
+ return undefined;
173
+ }
174
+ const isDatePropagationSupported = isDefaultDatePropagationSupported(derivedPropertyExpressionState.propertyExpression, derivedPropertyExpressionState.queryBuilderState, prevPropertyExpression);
175
+ return milestoningState
176
+ .getMilestoningImplementation(temporalTarget)
177
+ .generateMilestoningDate(isDatePropagationSupported, hasDefaultMilestoningDate ?? false, prevPropertyExpression, temporalSource, idx, derivedPropertyExpressionState);
178
+ };
179
+ export const validateMilestoningPropertyExpressionChain = (sourceStereotype, targetStereotype, propertyExpression) => {
180
+ if (sourceStereotype !== MILESTONING_STEREOTYPE.BITEMPORAL &&
181
+ targetStereotype !== sourceStereotype) {
182
+ if (targetStereotype === MILESTONING_STEREOTYPE.BITEMPORAL) {
183
+ if (propertyExpression.parametersValues.length !== 3 &&
184
+ !sourceStereotype) {
185
+ throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have exactly two parameters`);
186
+ }
187
+ else if (propertyExpression.parametersValues.length < 2) {
188
+ throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should have at least one parameter`);
189
+ }
190
+ else if (propertyExpression.parametersValues.length > 3) {
191
+ throw new UnsupportedOperationError(`Property of milestoning sterotype '${MILESTONING_STEREOTYPE.BITEMPORAL}' should not have more than two parameters`);
192
+ }
193
+ }
194
+ else if (propertyExpression.parametersValues.length !== 2) {
195
+ throw new UnsupportedOperationError(`Property of milestoning sterotype '${targetStereotype}' should have exactly one parameter`);
196
+ }
197
+ }
198
+ };
199
+ //# sourceMappingURL=QueryBuilderMilestoningHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderMilestoningHelper.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,KAAK,EACL,sBAAsB,EACtB,8BAA8B,EAE9B,WAAW,EACX,8CAA8C,EAC9C,sBAAsB,EACtB,cAAc,EAEd,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAK9B,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,QAAyB,EACzB,KAAgB,EACoB,EAAE;IACtC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC9B,IAAI,KAAK,YAAY,KAAK,EAAE;QAC1B,OAAO,8BAA8B,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KACrD;SAAM,IAAI,KAAK,YAAY,WAAW,EAAE;QACvC,MAAM,6BAA6B,GACjC,8CAA8C,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAClE,IAAI,6BAA6B,CAAC,MAAM,EAAE;YACxC,MAAM,UAAU,GACd,6BAA6B,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,KAAK,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;QACA,IAAI,gBAAgB,KAAK,sBAAsB,CAAC,UAAU,EAAE;YAC1D,IACE,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC;gBAChD,CAAC,gBAAgB,EACjB;gBACA,MAAM,IAAI,yBAAyB,CACjC,sCAAsC,sBAAsB,CAAC,UAAU,sCAAsC,CAC9G,CAAC;aACH;iBAAM,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzD,MAAM,IAAI,yBAAyB,CACjC,sCAAsC,sBAAsB,CAAC,UAAU,sCAAsC,CAC9G,CAAC;aACH;iBAAM,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzD,MAAM,IAAI,yBAAyB,CACjC,sCAAsC,sBAAsB,CAAC,UAAU,4CAA4C,CACpH,CAAC;aACH;SACF;aAAM,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;YAC3D,MAAM,IAAI,yBAAyB,CACjC,sCAAsC,gBAAgB,qCAAqC,CAC5F,CAAC;SACH;KACF;AACH,CAAC,CAAC"}
@@ -0,0 +1,49 @@
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 { ValueSpecification, SimpleFunctionExpression, AbstractPropertyExpression, MILESTONING_STEREOTYPE } from '@finos/legend-graph';
17
+ import type { QueryBuilderDerivedPropertyExpressionState } from '../QueryBuilderPropertyEditorState.js';
18
+ import type { QueryBuilderMilestoningState } from './QueryBuilderMilestoningState.js';
19
+ export declare abstract class QueryBuilderMilestoningImplementation {
20
+ milestoningState: QueryBuilderMilestoningState;
21
+ readonly stereotype: MILESTONING_STEREOTYPE;
22
+ constructor(queryBuilderMilestoningState: QueryBuilderMilestoningState, stereotype: MILESTONING_STEREOTYPE);
23
+ /**
24
+ * Gets the milestoning date associated with the given stereotype
25
+ */
26
+ abstract getMilestoningDate(index?: number): ValueSpecification | undefined;
27
+ /**
28
+ * Gets the tooltip text for given stereotype
29
+ */
30
+ abstract getMilestoningToolTipText(): string;
31
+ /**
32
+ * Initializes milestoning parameters when they are not defined.
33
+ * We need to force initialize when we change class as we don't reset the whole milestoning state here.
34
+ */
35
+ abstract initializeMilestoningParameters(force?: boolean): void;
36
+ /**
37
+ * Checks whether the getAll function has the no of parameters as expected for a given stereotype and sets the corresponding milestoning dates.
38
+ */
39
+ abstract processGetAllParamaters(parameterValues: ValueSpecification[]): void;
40
+ /**
41
+ * Builds parameters for getAll() function with milestoned class
42
+ */
43
+ abstract buildGetAllParameters(getAllFunction: SimpleFunctionExpression): void;
44
+ /**
45
+ * Generates milestoning date for a propertyexpression based on its source and target stereotype
46
+ */
47
+ abstract generateMilestoningDate(isDatePropagationSupported: boolean, hasDefaultMilestoningDate: boolean, prevPropertyExpression: AbstractPropertyExpression | undefined, temporalSource: MILESTONING_STEREOTYPE | undefined, idx?: number, derivedPropertyExpressionState?: QueryBuilderDerivedPropertyExpressionState): ValueSpecification;
48
+ }
49
+ //# sourceMappingURL=QueryBuilderMilestoningImplementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderMilestoningImplementation.d.ts","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AACxG,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,8BAAsB,qCAAqC;IACzD,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC;gBAG1C,4BAA4B,EAAE,4BAA4B,EAC1D,UAAU,EAAE,sBAAsB;IAMpC;;OAEG;IACH,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAE3E;;OAEG;IACH,QAAQ,CAAC,yBAAyB,IAAI,MAAM;IAE5C;;;OAGG;IACH,QAAQ,CAAC,+BAA+B,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;IAE/D;;OAEG;IACH,QAAQ,CAAC,uBAAuB,CAAC,eAAe,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAE7E;;OAEG;IACH,QAAQ,CAAC,qBAAqB,CAC5B,cAAc,EAAE,wBAAwB,GACvC,IAAI;IAEP;;OAEG;IACH,QAAQ,CAAC,uBAAuB,CAC9B,0BAA0B,EAAE,OAAO,EACnC,yBAAyB,EAAE,OAAO,EAClC,sBAAsB,EAAE,0BAA0B,GAAG,SAAS,EAC9D,cAAc,EAAE,sBAAsB,GAAG,SAAS,EAClD,GAAG,CAAC,EAAE,MAAM,EACZ,8BAA8B,CAAC,EAAE,0CAA0C,GAC1E,kBAAkB;CACtB"}
@@ -0,0 +1,24 @@
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
+ export class QueryBuilderMilestoningImplementation {
17
+ milestoningState;
18
+ stereotype;
19
+ constructor(queryBuilderMilestoningState, stereotype) {
20
+ this.milestoningState = queryBuilderMilestoningState;
21
+ this.stereotype = stereotype;
22
+ }
23
+ }
24
+ //# sourceMappingURL=QueryBuilderMilestoningImplementation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderMilestoningImplementation.js","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningImplementation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,MAAM,OAAgB,qCAAqC;IACzD,gBAAgB,CAA+B;IACtC,UAAU,CAAyB;IAE5C,YACE,4BAA0D,EAC1D,UAAkC;QAElC,IAAI,CAAC,gBAAgB,GAAG,4BAA4B,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CAyCF"}
@@ -13,10 +13,12 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type ValueSpecification } from '@finos/legend-graph';
16
+ import { MILESTONING_STEREOTYPE, type ValueSpecification } from '@finos/legend-graph';
17
17
  import { type Hashable } from '@finos/legend-shared';
18
- import type { QueryBuilderState } from './QueryBuilderState.js';
18
+ import type { QueryBuilderState } from '../QueryBuilderState.js';
19
+ import type { QueryBuilderMilestoningImplementation } from './QueryBuilderMilestoningImplementation.js';
19
20
  export declare class QueryBuilderMilestoningState implements Hashable {
21
+ readonly milestoningImplementations: QueryBuilderMilestoningImplementation[];
20
22
  queryBuilderState: QueryBuilderState;
21
23
  showMilestoningEditor: boolean;
22
24
  businessDate?: ValueSpecification | undefined;
@@ -24,9 +26,11 @@ export declare class QueryBuilderMilestoningState implements Hashable {
24
26
  constructor(queryBuilderState: QueryBuilderState);
25
27
  get isMilestonedQuery(): boolean;
26
28
  setShowMilestoningEditor(val: boolean): void;
29
+ getMilestoningImplementation(stereotype: MILESTONING_STEREOTYPE): QueryBuilderMilestoningImplementation;
27
30
  private initializeQueryMilestoningParameters;
28
31
  setProcessingDate(val: ValueSpecification | undefined): void;
29
32
  setBusinessDate(val: ValueSpecification | undefined): void;
33
+ clearMilestoningDates(): void;
30
34
  updateMilestoningConfiguration(): void;
31
35
  buildMilestoningParameter(parameterName: string): ValueSpecification;
32
36
  get hashCode(): string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryBuilderMilestoningState.d.ts","sourceRoot":"","sources":["../../../src/stores/milestoning/QueryBuilderMilestoningState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAIL,sBAAsB,EAGtB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,QAAQ,EAGd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAGxG,qBAAa,4BAA6B,YAAW,QAAQ;IAC3D,QAAQ,CAAC,0BAA0B,EAAE,qCAAqC,EAAE,CACvE;IAEL,iBAAiB,EAAE,iBAAiB,CAAC;IAErC,qBAAqB,UAAS;IAG9B,YAAY,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC9C,cAAc,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;gBAEpC,iBAAiB,EAAE,iBAAiB;IAkChD,IAAI,iBAAiB,IAAI,OAAO,CAE/B;IAED,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI5C,4BAA4B,CAC1B,UAAU,EAAE,sBAAsB,GACjC,qCAAqC;IAQxC,OAAO,CAAC,oCAAoC;IAQ5C,iBAAiB,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAS5D,eAAe,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAS1D,qBAAqB,IAAI,IAAI;IAK7B,8BAA8B,IAAI,IAAI;IAiBtC,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,kBAAkB;IAsBpE,IAAI,QAAQ,IAAI,MAAM,CAMrB;CACF"}