@finos/legend-query-builder 3.2.10 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  2. package/lib/components/QueryBuilderPropertyExpressionEditor.js +5 -4
  3. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  4. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderTextEditor.js +1 -1
  6. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  7. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
  8. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js +5 -3
  9. package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.js.map +1 -1
  10. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +2 -2
  11. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  12. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  13. package/lib/components/shared/BasicValueSpecificationEditor.js +1 -0
  14. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  15. package/lib/components/shared/LambdaEditor.d.ts +18 -19
  16. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  17. package/lib/components/shared/LambdaEditor.js +30 -19
  18. package/lib/components/shared/LambdaEditor.js.map +1 -1
  19. package/lib/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.d.ts.map +1 -1
  20. package/lib/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js +20 -4
  21. package/lib/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.js.map +1 -1
  22. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
  23. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +54 -27
  24. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
  25. package/lib/index.css +2 -2
  26. package/lib/index.css.map +1 -1
  27. package/lib/package.json +2 -2
  28. package/lib/stores/QueryBuilderStateBuilder.d.ts +1 -1
  29. package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
  30. package/lib/stores/QueryBuilderStateBuilder.js +6 -7
  31. package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
  32. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  33. package/lib/stores/QueryBuilderValueSpecificationHelper.js +1 -0
  34. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  35. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts +3 -3
  36. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts.map +1 -1
  37. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js +18 -4
  38. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js.map +1 -1
  39. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts +2 -2
  40. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts.map +1 -1
  41. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js +1 -2
  42. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js.map +1 -1
  43. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.d.ts +2 -2
  44. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.d.ts.map +1 -1
  45. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.js.map +1 -1
  46. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.d.ts +2 -2
  47. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.d.ts.map +1 -1
  48. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.js.map +1 -1
  49. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.d.ts +2 -2
  50. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.d.ts.map +1 -1
  51. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.js.map +1 -1
  52. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.d.ts +2 -2
  53. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.d.ts.map +1 -1
  54. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.js.map +1 -1
  55. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.d.ts +2 -2
  56. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.d.ts.map +1 -1
  57. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.js.map +1 -1
  58. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.d.ts +2 -2
  59. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.d.ts.map +1 -1
  60. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.js.map +1 -1
  61. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.d.ts +2 -2
  62. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.d.ts.map +1 -1
  63. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.js.map +1 -1
  64. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.d.ts +2 -2
  65. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.d.ts.map +1 -1
  66. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.js.map +1 -1
  67. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.d.ts +2 -2
  68. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.d.ts.map +1 -1
  69. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.js.map +1 -1
  70. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.d.ts +2 -2
  71. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.d.ts.map +1 -1
  72. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.js.map +1 -1
  73. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.d.ts +2 -2
  74. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.d.ts.map +1 -1
  75. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.js.map +1 -1
  76. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.d.ts +2 -2
  77. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.d.ts.map +1 -1
  78. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.js.map +1 -1
  79. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.d.ts +2 -2
  80. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.d.ts.map +1 -1
  81. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.js.map +1 -1
  82. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.d.ts +2 -2
  83. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.d.ts.map +1 -1
  84. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.js.map +1 -1
  85. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.d.ts +2 -2
  86. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.d.ts.map +1 -1
  87. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.js.map +1 -1
  88. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.d.ts +2 -2
  89. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.d.ts.map +1 -1
  90. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.js.map +1 -1
  91. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.d.ts +2 -2
  92. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.d.ts.map +1 -1
  93. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.js.map +1 -1
  94. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.d.ts +2 -2
  95. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.d.ts.map +1 -1
  96. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.js.map +1 -1
  97. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.d.ts +2 -2
  98. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.d.ts.map +1 -1
  99. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.js.map +1 -1
  100. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.d.ts +2 -2
  101. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.d.ts.map +1 -1
  102. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.js.map +1 -1
  103. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.d.ts +2 -2
  104. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.d.ts.map +1 -1
  105. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.js.map +1 -1
  106. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.d.ts +2 -2
  107. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.d.ts.map +1 -1
  108. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.js.map +1 -1
  109. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.d.ts +2 -2
  110. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.d.ts.map +1 -1
  111. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.js.map +1 -1
  112. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.d.ts +2 -2
  113. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.d.ts.map +1 -1
  114. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.js.map +1 -1
  115. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.d.ts +2 -2
  116. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.d.ts.map +1 -1
  117. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.js.map +1 -1
  118. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.d.ts +2 -2
  119. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.d.ts.map +1 -1
  120. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.js.map +1 -1
  121. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.d.ts +2 -2
  122. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.d.ts.map +1 -1
  123. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.js.map +1 -1
  124. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.d.ts +2 -2
  125. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.d.ts.map +1 -1
  126. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.js.map +1 -1
  127. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.d.ts +2 -2
  128. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.d.ts.map +1 -1
  129. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.js.map +1 -1
  130. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.d.ts +2 -2
  131. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.d.ts.map +1 -1
  132. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.js.map +1 -1
  133. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.d.ts +2 -2
  134. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.d.ts.map +1 -1
  135. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.js.map +1 -1
  136. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  137. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +2 -2
  138. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  139. package/lib/stores/shared/LambdaEditorState.d.ts.map +1 -1
  140. package/lib/stores/shared/LambdaEditorState.js.map +1 -1
  141. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  142. package/lib/stores/shared/ValueSpecificationEditorHelper.js +1 -0
  143. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  144. package/lib/stores/workflows/ClassQueryBuilderState.d.ts +5 -5
  145. package/lib/stores/workflows/ClassQueryBuilderState.js +6 -6
  146. package/lib/stores/workflows/MappingQueryBuilderState.d.ts +4 -4
  147. package/lib/stores/workflows/MappingQueryBuilderState.js +4 -4
  148. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +2 -2
  149. package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -2
  150. package/package.json +10 -10
  151. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +7 -8
  152. package/src/components/QueryBuilderTextEditor.tsx +1 -4
  153. package/src/components/explorer/QueryBuilderFunctionsExplorerPanel.tsx +5 -3
  154. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +2 -2
  155. package/src/components/shared/BasicValueSpecificationEditor.tsx +1 -0
  156. package/src/components/shared/LambdaEditor.tsx +126 -79
  157. package/src/graph-manager/protocol/pure/v1/V1_QueryBuilder_PureGraphManagerExtension.ts +35 -23
  158. package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +205 -83
  159. package/src/stores/QueryBuilderStateBuilder.ts +15 -19
  160. package/src/stores/QueryBuilderValueSpecificationHelper.ts +1 -0
  161. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.ts +44 -12
  162. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.ts +5 -12
  163. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.ts +2 -1
  164. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.ts +2 -1
  165. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.ts +2 -1
  166. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.ts +2 -1
  167. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.ts +2 -1
  168. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.ts +2 -1
  169. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.ts +2 -1
  170. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.ts +2 -1
  171. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.ts +2 -1
  172. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.ts +2 -1
  173. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.ts +2 -1
  174. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.ts +2 -1
  175. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.ts +2 -1
  176. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.ts +2 -1
  177. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.ts +2 -1
  178. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.ts +2 -1
  179. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.ts +2 -1
  180. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.ts +2 -1
  181. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.ts +2 -1
  182. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.ts +2 -1
  183. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.ts +2 -1
  184. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.ts +2 -1
  185. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.ts +2 -1
  186. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.ts +2 -1
  187. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.ts +2 -1
  188. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.ts +2 -1
  189. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.ts +2 -1
  190. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.ts +2 -1
  191. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.ts +2 -1
  192. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.ts +2 -1
  193. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.ts +2 -1
  194. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +2 -1
  195. package/src/stores/shared/LambdaEditorState.ts +1 -0
  196. package/src/stores/shared/ValueSpecificationEditorHelper.ts +1 -0
  197. package/src/stores/workflows/ClassQueryBuilderState.ts +6 -6
  198. package/src/stores/workflows/MappingQueryBuilderState.ts +4 -4
  199. package/src/stores/workflows/ServiceQueryBuilderState.ts +2 -2
@@ -52,6 +52,11 @@ import {
52
52
  PrimitiveType,
53
53
  V1_CStrictDate,
54
54
  V1_CString,
55
+ CORE_PURE_PATH,
56
+ FunctionType,
57
+ LambdaFunction,
58
+ LambdaFunctionInstanceValue,
59
+ PackageableElementExplicitReference,
55
60
  } from '@finos/legend-graph';
56
61
  import {
57
62
  QUERY_BUILDER_PURE_PATH,
@@ -91,81 +96,41 @@ const buildProjectionColumnLambda = (
91
96
  let currentPropertyExpression: V1_ValueSpecification = valueSpecification
92
97
  .body[0] as V1_ValueSpecification;
93
98
 
94
- // calendar
95
- if (
96
- currentPropertyExpression instanceof V1_AppliedFunction &&
97
- matchFunctionName(
98
- currentPropertyExpression.function,
99
- Object.values(QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS),
100
- )
101
- ) {
102
- assertTrue(
103
- currentPropertyExpression.parameters.length === 4,
104
- `Can't build projection column: only support calendar function with four parameters`,
105
- );
106
- assertType(
107
- currentPropertyExpression.parameters[0],
108
- V1_AppliedProperty,
109
- `Can't build projection column: only support first parameter of calendar function as property expression`,
110
- );
111
- const calendarType = guaranteeType(
112
- currentPropertyExpression.parameters[1],
113
- V1_CString,
114
- `Can't build projection column: only support second parameter of calendar function as String`,
115
- );
99
+ assertType(
100
+ currentPropertyExpression,
101
+ V1_AppliedProperty,
102
+ `Can't build projection column: only support lambda body as property expression`,
103
+ );
104
+ while (currentPropertyExpression instanceof V1_AppliedProperty) {
116
105
  assertTrue(
117
- Object.values(QUERY_BUILDER_CALENDAR_TYPE).find(
118
- (val) => val === calendarType.value,
119
- ) !== undefined,
120
- `Can't build projection column: ${calendarType.value} is not a supported calendar type`,
121
- );
122
- guaranteeType(
123
- currentPropertyExpression.parameters[2],
124
- V1_CStrictDate,
125
- `Can't build projection column: only support third parameter of calendar function as StrictDate`,
126
- );
127
- assertType(
128
- currentPropertyExpression.parameters[3],
129
- V1_AppliedProperty,
130
- `Can't build projection column: only support fourth parameter of calendar function as property expression`,
131
- );
132
- } else {
133
- assertType(
134
- currentPropertyExpression,
135
- V1_AppliedProperty,
106
+ currentPropertyExpression.parameters.length >= 1,
136
107
  `Can't build projection column: only support lambda body as property expression`,
137
108
  );
138
- while (currentPropertyExpression instanceof V1_AppliedProperty) {
139
- assertTrue(
140
- currentPropertyExpression.parameters.length >= 1,
141
- `Can't build projection column: only support lambda body as property expression`,
142
- );
109
+ currentPropertyExpression = currentPropertyExpression
110
+ .parameters[0] as V1_ValueSpecification;
111
+ // Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
112
+ // $x.employees->subType(@Person)->subType(@Staff)
113
+ while (
114
+ currentPropertyExpression instanceof V1_AppliedFunction &&
115
+ matchFunctionName(
116
+ currentPropertyExpression.function,
117
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
118
+ )
119
+ ) {
143
120
  currentPropertyExpression = currentPropertyExpression
144
121
  .parameters[0] as V1_ValueSpecification;
145
- // Take care of chains of subtype (a pattern that is not useful, but we want to support and rectify)
146
- // $x.employees->subType(@Person)->subType(@Staff)
147
- while (
148
- currentPropertyExpression instanceof V1_AppliedFunction &&
149
- matchFunctionName(
150
- currentPropertyExpression.function,
151
- QUERY_BUILDER_SUPPORTED_FUNCTIONS.SUBTYPE,
152
- )
153
- ) {
154
- currentPropertyExpression = currentPropertyExpression
155
- .parameters[0] as V1_ValueSpecification;
156
- }
157
122
  }
158
- // check lambda variable and parameter match
159
- assertType(
160
- currentPropertyExpression,
161
- V1_Variable,
162
- `Can't build projection column: only support lambda body as property expression`,
163
- );
164
- assertTrue(
165
- columnLambdaParameter.name === currentPropertyExpression.name,
166
- `Can't build column lambda: expects variable used in lambda body '${currentPropertyExpression.name}' to match lambda parameter '${columnLambdaParameter.name}'`,
167
- );
168
123
  }
124
+ // check lambda variable and parameter match
125
+ assertType(
126
+ currentPropertyExpression,
127
+ V1_Variable,
128
+ `Can't build projection column: only support lambda body as property expression`,
129
+ );
130
+ assertTrue(
131
+ columnLambdaParameter.name === currentPropertyExpression.name,
132
+ `Can't build column lambda: expects variable used in lambda body '${currentPropertyExpression.name}' to match lambda parameter '${columnLambdaParameter.name}'`,
133
+ );
169
134
  return valueSpecification.accept_ValueSpecificationVisitor(
170
135
  new V1_ValueSpecificationBuilder(
171
136
  compileContext,
@@ -175,6 +140,138 @@ const buildProjectionColumnLambda = (
175
140
  );
176
141
  };
177
142
 
143
+ const buildCalendarFunctionExpression = (
144
+ valueSpecification: V1_ValueSpecification,
145
+ openVariables: string[],
146
+ compileContext: V1_GraphBuilderContext,
147
+ processingContext: V1_ProcessingContext,
148
+ ): ValueSpecification => {
149
+ assertType(
150
+ valueSpecification,
151
+ V1_Lambda,
152
+ `Can't build calendar aggregation column: only support lambda`,
153
+ );
154
+
155
+ // lambda parameter
156
+ assertTrue(
157
+ valueSpecification.parameters.length === 1,
158
+ `Can't build calendar aggregation column: only support lambda with 1 parameter`,
159
+ );
160
+
161
+ // lambda body
162
+ assertTrue(
163
+ valueSpecification.body.length === 1,
164
+ `Can't build calendar aggregation column: only support lambda body with 1 expression`,
165
+ );
166
+ const columnLambdaParameter = guaranteeType(
167
+ valueSpecification.parameters[0],
168
+ V1_Variable,
169
+ `Can't build calendar aggregation column: only support lambda with 1 parameter`,
170
+ );
171
+ const currentPropertyExpression = guaranteeType(
172
+ valueSpecification.body[0],
173
+ V1_AppliedFunction,
174
+ `Can't build calendar aggregation column: only support applied function`,
175
+ );
176
+ assertTrue(
177
+ matchFunctionName(
178
+ currentPropertyExpression.function,
179
+ Object.values(QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS),
180
+ ),
181
+ `Can't build calendar aggregation columnn: unsupported calenddar function`,
182
+ );
183
+
184
+ assertTrue(
185
+ currentPropertyExpression.parameters.length === 4,
186
+ `Can't build calendar aggregation column: only support calendar function with four parameters`,
187
+ );
188
+ assertType(
189
+ currentPropertyExpression.parameters[0],
190
+ V1_AppliedProperty,
191
+ `Can't build calendar aggregation column: only support first parameter of calendar function as property expression`,
192
+ );
193
+ const calendarType = guaranteeType(
194
+ currentPropertyExpression.parameters[1],
195
+ V1_CString,
196
+ `Can't build calendar aggregation column: only support second parameter of calendar function as String`,
197
+ );
198
+ assertTrue(
199
+ Object.values(QUERY_BUILDER_CALENDAR_TYPE).find(
200
+ (val) => val === calendarType.value,
201
+ ) !== undefined,
202
+ `Can't build calendar aggregation column: ${calendarType.value} is not a supported calendar type`,
203
+ );
204
+ guaranteeType(
205
+ currentPropertyExpression.parameters[2],
206
+ V1_CStrictDate,
207
+ `Can't build calendar aggregation column: only support third parameter of calendar function as StrictDate`,
208
+ );
209
+ const dateColumn =
210
+ currentPropertyExpression.parameters[0].accept_ValueSpecificationVisitor(
211
+ new V1_ValueSpecificationBuilder(
212
+ compileContext,
213
+ processingContext,
214
+ openVariables,
215
+ ),
216
+ );
217
+ const calendarTypeValueSpec = guaranteeNonNullable(
218
+ currentPropertyExpression.parameters[1],
219
+ ).accept_ValueSpecificationVisitor(
220
+ new V1_ValueSpecificationBuilder(
221
+ compileContext,
222
+ processingContext,
223
+ openVariables,
224
+ ),
225
+ );
226
+ const endDate = guaranteeNonNullable(
227
+ currentPropertyExpression.parameters[2],
228
+ ).accept_ValueSpecificationVisitor(
229
+ new V1_ValueSpecificationBuilder(
230
+ compileContext,
231
+ processingContext,
232
+ openVariables,
233
+ ),
234
+ );
235
+ const columnLambda = guaranteeNonNullable(
236
+ currentPropertyExpression.parameters[3],
237
+ );
238
+ const targetColumn =
239
+ returnUndefOnError(() =>
240
+ columnLambda.accept_ValueSpecificationVisitor(
241
+ new V1_ValueSpecificationBuilder(
242
+ compileContext,
243
+ processingContext,
244
+ openVariables,
245
+ ),
246
+ ),
247
+ ) ??
248
+ new INTERNAL__UnknownValueSpecification(
249
+ V1_serializeValueSpecification(
250
+ columnLambda,
251
+ compileContext.extensions.plugins,
252
+ ),
253
+ );
254
+ const calendarFunctionExpression = V1_buildBaseSimpleFunctionExpression(
255
+ [dateColumn, calendarTypeValueSpec, endDate, targetColumn],
256
+ currentPropertyExpression.function,
257
+ compileContext,
258
+ );
259
+ const functionInstanceValue = new LambdaFunctionInstanceValue();
260
+ const functionType = new FunctionType(
261
+ PackageableElementExplicitReference.create(
262
+ compileContext.graph.getType(CORE_PURE_PATH.ANY),
263
+ ),
264
+ Multiplicity.ONE,
265
+ );
266
+ functionType.parameters.push(
267
+ new VariableExpression(columnLambdaParameter.name, Multiplicity.ONE),
268
+ );
269
+ const lambdaFunction = new LambdaFunction(functionType);
270
+ lambdaFunction.expressionSequence = [calendarFunctionExpression];
271
+ functionInstanceValue.values.push(lambdaFunction);
272
+ return functionInstanceValue;
273
+ };
274
+
178
275
  const buildAggregationExpression = (
179
276
  valueSpecification: V1_ValueSpecification,
180
277
  openVariables: string[],
@@ -205,21 +302,46 @@ const buildAggregationExpression = (
205
302
  V1_Lambda,
206
303
  `Can't build agg() expression: agg() expects argument #1 as a lambda`,
207
304
  );
208
- const processedColumnLambda =
209
- returnUndefOnError(() =>
210
- buildProjectionColumnLambda(
211
- columnLambda,
212
- openVariables,
213
- compileContext,
214
- processingContext,
215
- ),
216
- ) ??
217
- new INTERNAL__UnknownValueSpecification(
218
- V1_serializeValueSpecification(
219
- columnLambda,
220
- compileContext.extensions.plugins,
221
- ),
222
- );
305
+ let processedColumnLambda;
306
+ if (
307
+ columnLambda.body[0] instanceof V1_AppliedFunction &&
308
+ matchFunctionName(
309
+ columnLambda.body[0].function,
310
+ Object.values(QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS),
311
+ )
312
+ ) {
313
+ processedColumnLambda =
314
+ returnUndefOnError(() =>
315
+ buildCalendarFunctionExpression(
316
+ columnLambda,
317
+ openVariables,
318
+ compileContext,
319
+ processingContext,
320
+ ),
321
+ ) ??
322
+ new INTERNAL__UnknownValueSpecification(
323
+ V1_serializeValueSpecification(
324
+ columnLambda,
325
+ compileContext.extensions.plugins,
326
+ ),
327
+ );
328
+ } else {
329
+ processedColumnLambda =
330
+ returnUndefOnError(() =>
331
+ buildProjectionColumnLambda(
332
+ columnLambda,
333
+ openVariables,
334
+ compileContext,
335
+ processingContext,
336
+ ),
337
+ ) ??
338
+ new INTERNAL__UnknownValueSpecification(
339
+ V1_serializeValueSpecification(
340
+ columnLambda,
341
+ compileContext.extensions.plugins,
342
+ ),
343
+ );
344
+ }
223
345
 
224
346
  // aggregate lambda
225
347
  const aggregateLambda = guaranteeType(
@@ -40,7 +40,7 @@ import {
40
40
  PrimitiveInstanceValue,
41
41
  SimpleFunctionExpression,
42
42
  type VariableExpression,
43
- AbstractPropertyExpression,
43
+ type AbstractPropertyExpression,
44
44
  getMilestoneTemporalStereotype,
45
45
  type INTERNAL__PropagatedValue,
46
46
  type ValueSpecification,
@@ -143,22 +143,6 @@ const processLetExpression = (
143
143
  queryBuilderState.constantState.addConstant(constantExpression);
144
144
  };
145
145
 
146
- const processCalendarFunction = (
147
- expression: SimpleFunctionExpression,
148
- queryBuilderState: QueryBuilderState,
149
- parentLambda: LambdaFunction,
150
- ): void => {
151
- queryBuilderState.isCalendarEnabled = true;
152
- assertTrue(
153
- expression.parametersValues.length === 4,
154
- 'Calendar function expected to have four parameters',
155
- );
156
- processTDSProjectionColumnPropertyExpression(
157
- guaranteeType(expression.parametersValues[3], AbstractPropertyExpression),
158
- queryBuilderState,
159
- );
160
- };
161
-
162
146
  /**
163
147
  * This is the value specification processor (a.k.a state builder) for query builder.
164
148
  *
@@ -297,6 +281,9 @@ export class QueryBuilderValueSpecificationProcessor
297
281
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
298
282
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
299
283
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG,
284
+ ...Object.values(
285
+ QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS,
286
+ ),
300
287
  ])
301
288
  ) {
302
289
  processTDSProjectionDerivationExpression(
@@ -561,10 +548,16 @@ export class QueryBuilderValueSpecificationProcessor
561
548
  Object.values(QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS),
562
549
  )
563
550
  ) {
564
- processCalendarFunction(
551
+ this.queryBuilderState.isCalendarEnabled = true;
552
+ assertTrue(
553
+ valueSpecification.parametersValues.length === 4,
554
+ 'Calendar function expected to have four parameters',
555
+ );
556
+ QueryBuilderValueSpecificationProcessor.processChild(
557
+ guaranteeNonNullable(valueSpecification.parametersValues[3]),
565
558
  valueSpecification,
566
- this.queryBuilderState,
567
559
  this.parentLambda,
560
+ this.queryBuilderState,
568
561
  );
569
562
  return;
570
563
  }
@@ -590,6 +583,9 @@ export class QueryBuilderValueSpecificationProcessor
590
583
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
591
584
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
592
585
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_AGG,
586
+ ...Object.values(
587
+ QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS,
588
+ ),
593
589
  ])
594
590
  ) {
595
591
  processTDSProjectionColumnPropertyExpression(
@@ -215,6 +215,7 @@ export const generateDefaultValueForPrimitiveType = (
215
215
  case PRIMITIVE_TYPE.DECIMAL:
216
216
  case PRIMITIVE_TYPE.FLOAT:
217
217
  case PRIMITIVE_TYPE.INTEGER:
218
+ case PRIMITIVE_TYPE.BYTE:
218
219
  case PRIMITIVE_TYPE.BINARY:
219
220
  return 0;
220
221
  case PRIMITIVE_TYPE.DATE:
@@ -14,16 +14,23 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { type Hashable, guaranteeType } from '@finos/legend-shared';
18
- import type {
17
+ import {
18
+ type Hashable,
19
+ guaranteeType,
20
+ UnsupportedOperationError,
21
+ } from '@finos/legend-shared';
22
+ import {
19
23
  AbstractPropertyExpression,
20
- PrimitiveInstanceValue,
21
- SimpleFunctionExpression,
22
- ValueSpecification,
24
+ INTERNAL__UnknownValueSpecification,
25
+ LambdaFunctionInstanceValue,
26
+ type PrimitiveInstanceValue,
27
+ type SimpleFunctionExpression,
28
+ type ValueSpecification,
23
29
  } from '@finos/legend-graph';
24
30
  import {
25
31
  type QueryBuilderProjectionColumnState,
26
32
  QueryBuilderSimpleProjectionColumnState,
33
+ QueryBuilderDerivationProjectionColumnState,
27
34
  } from '../projection/QueryBuilderProjectionColumnState.js';
28
35
  import type { QueryBuilderAggregateColumnState } from './QueryBuilderAggregationState.js';
29
36
  import { computed, makeObservable, observable, action } from 'mobx';
@@ -59,18 +66,43 @@ export abstract class QueryBuilderAggregateCalendarFunction
59
66
  ): boolean;
60
67
 
61
68
  abstract buildCalendarFunctionExpression(
62
- propertyExpression: AbstractPropertyExpression,
69
+ propertyExpression:
70
+ | AbstractPropertyExpression
71
+ | INTERNAL__UnknownValueSpecification,
63
72
  ): ValueSpecification;
64
73
 
65
74
  buildCalendarFunctionExpressionFromState(
66
75
  aggregateColumnState: QueryBuilderAggregateColumnState,
76
+ columnLambda: ValueSpecification,
67
77
  ): ValueSpecification {
68
- return this.buildCalendarFunctionExpression(
69
- guaranteeType(
70
- aggregateColumnState.projectionColumnState,
71
- QueryBuilderSimpleProjectionColumnState,
72
- ).propertyExpressionState.propertyExpression,
73
- );
78
+ let targetColumn:
79
+ | AbstractPropertyExpression
80
+ | INTERNAL__UnknownValueSpecification
81
+ | undefined;
82
+ if (
83
+ aggregateColumnState.projectionColumnState instanceof
84
+ QueryBuilderSimpleProjectionColumnState &&
85
+ columnLambda instanceof LambdaFunctionInstanceValue
86
+ ) {
87
+ targetColumn = guaranteeType(
88
+ columnLambda.values[0]?.expressionSequence[0],
89
+ AbstractPropertyExpression,
90
+ );
91
+ } else if (
92
+ aggregateColumnState.projectionColumnState instanceof
93
+ QueryBuilderDerivationProjectionColumnState
94
+ ) {
95
+ targetColumn = guaranteeType(
96
+ columnLambda,
97
+ INTERNAL__UnknownValueSpecification,
98
+ );
99
+ }
100
+ if (!targetColumn) {
101
+ throw new UnsupportedOperationError(
102
+ "Can't build calendar aggregation column: target column should be defined",
103
+ );
104
+ }
105
+ return this.buildCalendarFunctionExpression(targetColumn);
74
106
  }
75
107
 
76
108
  abstract updateAggregateColumnState(
@@ -26,6 +26,7 @@ import {
26
26
  PrimitiveType,
27
27
  PRIMITIVE_TYPE,
28
28
  VariableExpression,
29
+ type INTERNAL__UnknownValueSpecification,
29
30
  } from '@finos/legend-graph';
30
31
  import {
31
32
  guaranteeType,
@@ -41,7 +42,9 @@ export const buildCalendarFunctionExpression = (
41
42
  dateColumn: AbstractPropertyExpression | undefined,
42
43
  calendarType: QUERY_BUILDER_CALENDAR_TYPE,
43
44
  endDate: PrimitiveInstanceValue,
44
- targetColumn: AbstractPropertyExpression,
45
+ targetColumn:
46
+ | AbstractPropertyExpression
47
+ | INTERNAL__UnknownValueSpecification,
45
48
  ): ValueSpecification => {
46
49
  const expression = new SimpleFunctionExpression(
47
50
  extractElementNameFromPath(calendarFunctionFullPath),
@@ -50,7 +53,7 @@ export const buildCalendarFunctionExpression = (
50
53
  expression.parametersValues.push(dateColumn);
51
54
  } else {
52
55
  throw new UnsupportedOperationError(
53
- `Please specify date column for calendar Function for column ${targetColumn.func.value.name}`,
56
+ `Please specify date column for calendar function for column`,
54
57
  );
55
58
  }
56
59
  const calendarTypeParameter = new PrimitiveInstanceValue(
@@ -147,16 +150,6 @@ export const updateAggregateColumnState = (
147
150
  )}() with third parameter of type StrictDate`,
148
151
  );
149
152
 
150
- guaranteeType(
151
- expression.parametersValues[3],
152
- AbstractPropertyExpression,
153
- `Can't process ${extractElementNameFromPath(
154
- calendarFunctionFullPath,
155
- )}() expression: only support ${extractElementNameFromPath(
156
- calendarFunctionFullPath,
157
- )}() fourth parameter as property expression`,
158
- );
159
-
160
153
  calendarFunction.calendarType = calendarTypeParameter
161
154
  .values[0] as QUERY_BUILDER_CALENDAR_TYPE;
162
155
  calendarFunction.endDate = endDate;
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Annualized
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_ANNUALIZED,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Cme
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CME,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Cw
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CW,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -65,7 +66,7 @@ export class QueryBuilderAggregateCalendarFunction_Cw_Fm
65
66
  }
66
67
 
67
68
  buildCalendarFunctionExpression(
68
- p: AbstractPropertyExpression,
69
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
69
70
  ): ValueSpecification {
70
71
  return buildCalendarFunctionExpression(
71
72
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CW_FM,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Cy_Minus2
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CY_MINUS2,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Cy_Minus3
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CY_MINUS3,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_Mtd
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_MTD,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_P12Wa
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_P12WA,
@@ -19,6 +19,7 @@ import {
19
19
  type ValueSpecification,
20
20
  type SimpleFunctionExpression,
21
21
  type AbstractPropertyExpression,
22
+ type INTERNAL__UnknownValueSpecification,
22
23
  } from '@finos/legend-graph';
23
24
  import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
24
25
  import {
@@ -64,7 +65,7 @@ export class QueryBuilderAggregateCalendarFunction_P12Wtd
64
65
  }
65
66
 
66
67
  buildCalendarFunctionExpression(
67
- p: AbstractPropertyExpression,
68
+ p: AbstractPropertyExpression | INTERNAL__UnknownValueSpecification,
68
69
  ): ValueSpecification {
69
70
  return buildCalendarFunctionExpression(
70
71
  QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_P12WTD,