@finos/legend-query-builder 3.0.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +51 -4
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +18 -0
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +152 -15
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.d.ts +33 -0
- package/lib/graph/QueryBuilderMetaModelConst.d.ts.map +1 -1
- package/lib/graph/QueryBuilderMetaModelConst.js +34 -0
- package/lib/graph/QueryBuilderMetaModelConst.js.map +1 -1
- package/lib/graph-manager/QueryBuilderConst.d.ts +20 -0
- package/lib/graph-manager/QueryBuilderConst.d.ts.map +1 -0
- package/lib/graph-manager/QueryBuilderConst.js +21 -0
- package/lib/graph-manager/QueryBuilderConst.js.map +1 -0
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js +3 -2
- package/lib/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +27 -14
- package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderState.d.ts +2 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +7 -0
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +11 -2
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.d.ts +32 -1
- package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateHashUtils.js +32 -0
- package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderTextEditorState.js +12 -6
- package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
- package/lib/stores/explorer/QueryBuilderExplorerState.js +2 -2
- package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +2 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +14 -4
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts +38 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js +54 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunctionLoader.d.ts +18 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunctionLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunctionLoader.js +80 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunctionLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +8 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +24 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +23 -0
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts +22 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js +61 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.d.ts +28 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.js +55 -0
- package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.js.map +1 -0
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +9 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/package.json +5 -5
- package/src/components/QueryBuilder.tsx +79 -0
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +456 -92
- package/src/graph/QueryBuilderMetaModelConst.ts +34 -0
- package/src/graph-manager/QueryBuilderConst.ts +20 -0
- package/src/graph-manager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +10 -1
- package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +73 -28
- package/src/stores/QueryBuilderState.ts +8 -0
- package/src/stores/QueryBuilderStateBuilder.ts +33 -2
- package/src/stores/QueryBuilderStateHashUtils.ts +33 -0
- package/src/stores/QueryBuilderTextEditorState.ts +21 -14
- package/src/stores/explorer/QueryBuilderExplorerState.ts +2 -1
- package/src/stores/fetch-structure/QueryBuilderFetchStructureState.ts +1 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +22 -3
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunctionLoader.ts +83 -0
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +31 -0
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +41 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.ts +175 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Annualized.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cme.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cw_Fm.ts +99 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus2.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Cy_Minus3.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Mtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wa.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P12Wtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wa.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P4Wtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wa.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_P52Wtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pma.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pmtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pqtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorDay.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_PriorYear.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pw_Fm.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwa.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pwtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pymtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pyqtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pytd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywa.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Pywtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Qtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_ReportEndDay.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Wtd.ts +98 -0
- package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunction_Ytd.ts +98 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +18 -1
- package/tsconfig.json +35 -0
|
@@ -28,6 +28,7 @@ import type { QueryBuilderAggregateOperator } from './QueryBuilderAggregateOpera
|
|
|
28
28
|
import type { QueryBuilderProjectionColumnState } from '../projection/QueryBuilderProjectionColumnState.js';
|
|
29
29
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../QueryBuilderStateHashUtils.js';
|
|
30
30
|
import { QueryBuilderTDSColumnState } from '../QueryBuilderTDSColumnState.js';
|
|
31
|
+
import type { QueryBuilderAggregateCalendarFunction } from './QueryBuilderAggregateCalendarFunction.js';
|
|
31
32
|
|
|
32
33
|
export class QueryBuilderAggregateColumnState
|
|
33
34
|
extends QueryBuilderTDSColumnState
|
|
@@ -37,6 +38,8 @@ export class QueryBuilderAggregateColumnState
|
|
|
37
38
|
projectionColumnState: QueryBuilderProjectionColumnState;
|
|
38
39
|
lambdaParameterName: string = DEFAULT_LAMBDA_VARIABLE_NAME;
|
|
39
40
|
operator: QueryBuilderAggregateOperator;
|
|
41
|
+
calendarFunction?: QueryBuilderAggregateCalendarFunction | undefined;
|
|
42
|
+
hideCalendarColumnState = true;
|
|
40
43
|
|
|
41
44
|
constructor(
|
|
42
45
|
aggregationState: QueryBuilderAggregationState,
|
|
@@ -47,10 +50,14 @@ export class QueryBuilderAggregateColumnState
|
|
|
47
50
|
makeObservable(this, {
|
|
48
51
|
projectionColumnState: observable,
|
|
49
52
|
lambdaParameterName: observable,
|
|
53
|
+
calendarFunction: observable,
|
|
54
|
+
hideCalendarColumnState: observable,
|
|
50
55
|
operator: observable,
|
|
56
|
+
setHideCalendarColumnState: action,
|
|
51
57
|
setColumnState: action,
|
|
52
58
|
setLambdaParameterName: action,
|
|
53
59
|
setOperator: action,
|
|
60
|
+
setCalendarFunction: action,
|
|
54
61
|
hashCode: computed,
|
|
55
62
|
});
|
|
56
63
|
|
|
@@ -58,6 +65,7 @@ export class QueryBuilderAggregateColumnState
|
|
|
58
65
|
this.projectionColumnState = projectionColumnState;
|
|
59
66
|
this.operator = operator;
|
|
60
67
|
}
|
|
68
|
+
|
|
61
69
|
setColumnState(val: QueryBuilderProjectionColumnState): void {
|
|
62
70
|
this.projectionColumnState = val;
|
|
63
71
|
}
|
|
@@ -66,6 +74,16 @@ export class QueryBuilderAggregateColumnState
|
|
|
66
74
|
this.lambdaParameterName = val;
|
|
67
75
|
}
|
|
68
76
|
|
|
77
|
+
setHideCalendarColumnState(val: boolean): void {
|
|
78
|
+
this.hideCalendarColumnState = val;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
setCalendarFunction(
|
|
82
|
+
val: QueryBuilderAggregateCalendarFunction | undefined,
|
|
83
|
+
): void {
|
|
84
|
+
this.calendarFunction = val;
|
|
85
|
+
}
|
|
86
|
+
|
|
69
87
|
setOperator(val: QueryBuilderAggregateOperator): void {
|
|
70
88
|
this.operator = val;
|
|
71
89
|
}
|
|
@@ -78,6 +96,7 @@ export class QueryBuilderAggregateColumnState
|
|
|
78
96
|
return hashArray([
|
|
79
97
|
QUERY_BUILDER_STATE_HASH_STRUCTURE.AGGREGATE_COLUMN_STATE,
|
|
80
98
|
this.operator,
|
|
99
|
+
this.calendarFunction ?? '',
|
|
81
100
|
]);
|
|
82
101
|
}
|
|
83
102
|
|
|
@@ -89,22 +108,26 @@ export class QueryBuilderAggregateColumnState
|
|
|
89
108
|
export class QueryBuilderAggregationState implements Hashable {
|
|
90
109
|
readonly tdsState: QueryBuilderTDSState;
|
|
91
110
|
readonly operators: QueryBuilderAggregateOperator[] = [];
|
|
111
|
+
readonly calendarFunctions: QueryBuilderAggregateCalendarFunction[];
|
|
92
112
|
columns: QueryBuilderAggregateColumnState[] = [];
|
|
93
113
|
|
|
94
114
|
constructor(
|
|
95
115
|
tdsState: QueryBuilderTDSState,
|
|
96
116
|
operators: QueryBuilderAggregateOperator[],
|
|
117
|
+
calendarFunctions: QueryBuilderAggregateCalendarFunction[],
|
|
97
118
|
) {
|
|
98
119
|
makeObservable(this, {
|
|
99
120
|
columns: observable,
|
|
100
121
|
removeColumn: action,
|
|
101
122
|
addColumn: action,
|
|
102
123
|
changeColumnAggregateOperator: action,
|
|
124
|
+
disableCalendar: action,
|
|
103
125
|
hashCode: computed,
|
|
104
126
|
});
|
|
105
127
|
|
|
106
128
|
this.tdsState = tdsState;
|
|
107
129
|
this.operators = operators;
|
|
130
|
+
this.calendarFunctions = calendarFunctions;
|
|
108
131
|
}
|
|
109
132
|
|
|
110
133
|
removeColumn(val: QueryBuilderAggregateColumnState): void {
|
|
@@ -163,6 +186,14 @@ export class QueryBuilderAggregationState implements Hashable {
|
|
|
163
186
|
}
|
|
164
187
|
}
|
|
165
188
|
|
|
189
|
+
disableCalendar(): void {
|
|
190
|
+
this.tdsState.queryBuilderState.setIsCalendarEnabled(false);
|
|
191
|
+
this.columns.forEach((column) => {
|
|
192
|
+
column.setCalendarFunction(undefined);
|
|
193
|
+
column.setHideCalendarColumnState(true);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
166
197
|
get hashCode(): string {
|
|
167
198
|
return hashArray([
|
|
168
199
|
QUERY_BUILDER_STATE_HASH_STRUCTURE.AGGREGATION_STATE,
|
|
@@ -104,6 +104,28 @@ export const processTDSAggregateExpression = (
|
|
|
104
104
|
`Can't process agg() lambda: only support agg() lambda body with 1 expression`,
|
|
105
105
|
);
|
|
106
106
|
|
|
107
|
+
let calendarExpression: SimpleFunctionExpression | undefined;
|
|
108
|
+
if (queryBuilderState.isCalendarEnabled) {
|
|
109
|
+
const childExpression = expression.parametersValues[0];
|
|
110
|
+
assertType(
|
|
111
|
+
childExpression,
|
|
112
|
+
LambdaFunctionInstanceValue,
|
|
113
|
+
`Can't process agg() expression: agg() expects argument #0 to be a lambda function`,
|
|
114
|
+
);
|
|
115
|
+
const lambdaFunc1 = guaranteeNonNullable(
|
|
116
|
+
childExpression.values[0],
|
|
117
|
+
`Can't process agg() lambda: agg() lambda function is missing`,
|
|
118
|
+
);
|
|
119
|
+
assertTrue(
|
|
120
|
+
lambdaFunc1.expressionSequence.length === 1,
|
|
121
|
+
`Can't process agg() lambda: only support agg() lambda body with 1 expression`,
|
|
122
|
+
);
|
|
123
|
+
calendarExpression =
|
|
124
|
+
lambdaFunc1.expressionSequence[0] instanceof SimpleFunctionExpression
|
|
125
|
+
? lambdaFunc1.expressionSequence[0]
|
|
126
|
+
: undefined;
|
|
127
|
+
}
|
|
128
|
+
|
|
107
129
|
assertTrue(
|
|
108
130
|
lambdaFunc.functionType.parameters.length === 1,
|
|
109
131
|
`Can't process agg() lambda: only support agg() lambda with 1 parameter`,
|
|
@@ -128,6 +150,25 @@ export const processTDSAggregateExpression = (
|
|
|
128
150
|
);
|
|
129
151
|
if (aggregateColumnState) {
|
|
130
152
|
aggregationState.addColumn(aggregateColumnState);
|
|
153
|
+
if (
|
|
154
|
+
queryBuilderState.isCalendarEnabled &&
|
|
155
|
+
calendarExpression !== undefined
|
|
156
|
+
) {
|
|
157
|
+
for (const calendarFunction of aggregationState.calendarFunctions) {
|
|
158
|
+
// NOTE: this allow plugin author to either return `undefined` or throw error
|
|
159
|
+
// if there is a problem with building the lambda. Either case, the plugin is
|
|
160
|
+
// considered as not supporting the lambda.
|
|
161
|
+
returnUndefOnError(() =>
|
|
162
|
+
calendarFunction.updateAggregateColumnState(
|
|
163
|
+
guaranteeNonNullable(calendarExpression),
|
|
164
|
+
aggregateColumnState,
|
|
165
|
+
),
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (!aggregateColumnState.calendarFunction) {
|
|
170
|
+
aggregateColumnState.setHideCalendarColumnState(true);
|
|
171
|
+
}
|
|
131
172
|
return;
|
|
132
173
|
}
|
|
133
174
|
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
type ValueSpecification,
|
|
19
|
+
SimpleFunctionExpression,
|
|
20
|
+
extractElementNameFromPath,
|
|
21
|
+
matchFunctionName,
|
|
22
|
+
AbstractPropertyExpression,
|
|
23
|
+
PrimitiveInstanceValue,
|
|
24
|
+
GenericType,
|
|
25
|
+
GenericTypeExplicitReference,
|
|
26
|
+
PrimitiveType,
|
|
27
|
+
PRIMITIVE_TYPE,
|
|
28
|
+
VariableExpression,
|
|
29
|
+
} from '@finos/legend-graph';
|
|
30
|
+
import {
|
|
31
|
+
guaranteeType,
|
|
32
|
+
assertTrue,
|
|
33
|
+
UnsupportedOperationError,
|
|
34
|
+
} from '@finos/legend-shared';
|
|
35
|
+
import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
|
|
36
|
+
import { type QueryBuilderAggregateCalendarFunction } from '../QueryBuilderAggregateCalendarFunction.js';
|
|
37
|
+
import { QUERY_BUILDER_CALENDAR_TYPE } from '../../../../../graph-manager/QueryBuilderConst.js';
|
|
38
|
+
|
|
39
|
+
export const buildCalendarFunctionExpression = (
|
|
40
|
+
calendarFunctionFullPath: string,
|
|
41
|
+
dateColumn: AbstractPropertyExpression | undefined,
|
|
42
|
+
calendarType: QUERY_BUILDER_CALENDAR_TYPE,
|
|
43
|
+
endDate: PrimitiveInstanceValue,
|
|
44
|
+
targetColumn: AbstractPropertyExpression,
|
|
45
|
+
): ValueSpecification => {
|
|
46
|
+
const expression = new SimpleFunctionExpression(
|
|
47
|
+
extractElementNameFromPath(calendarFunctionFullPath),
|
|
48
|
+
);
|
|
49
|
+
if (dateColumn) {
|
|
50
|
+
expression.parametersValues.push(dateColumn);
|
|
51
|
+
} else {
|
|
52
|
+
throw new UnsupportedOperationError(
|
|
53
|
+
`Please specify date column for calendar Function for column ${targetColumn.func.value.name}`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
const calendarTypeParameter = new PrimitiveInstanceValue(
|
|
57
|
+
GenericTypeExplicitReference.create(new GenericType(PrimitiveType.STRING)),
|
|
58
|
+
);
|
|
59
|
+
calendarTypeParameter.values = [calendarType];
|
|
60
|
+
expression.parametersValues.push(calendarTypeParameter);
|
|
61
|
+
expression.parametersValues.push(endDate);
|
|
62
|
+
expression.parametersValues.push(targetColumn);
|
|
63
|
+
return expression;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const updateAggregateColumnState = (
|
|
67
|
+
expression: SimpleFunctionExpression,
|
|
68
|
+
calendarFunctionFullPath: string,
|
|
69
|
+
calendarFunction: QueryBuilderAggregateCalendarFunction,
|
|
70
|
+
aggregateColumnState: QueryBuilderAggregateColumnState,
|
|
71
|
+
): void => {
|
|
72
|
+
if (matchFunctionName(expression.functionName, calendarFunctionFullPath)) {
|
|
73
|
+
assertTrue(
|
|
74
|
+
expression.parametersValues.length === 4,
|
|
75
|
+
`Can't process ${extractElementNameFromPath(
|
|
76
|
+
calendarFunctionFullPath,
|
|
77
|
+
)}() expression: ${extractElementNameFromPath(
|
|
78
|
+
calendarFunctionFullPath,
|
|
79
|
+
)}() expects four arguments`,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const dateColumn = guaranteeType(
|
|
83
|
+
expression.parametersValues[0],
|
|
84
|
+
AbstractPropertyExpression,
|
|
85
|
+
`Can't process ${extractElementNameFromPath(
|
|
86
|
+
calendarFunctionFullPath,
|
|
87
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
88
|
+
calendarFunctionFullPath,
|
|
89
|
+
)}() with first parameter as property expression`,
|
|
90
|
+
);
|
|
91
|
+
assertTrue(
|
|
92
|
+
dateColumn.func.value.genericType.value.rawType.name ===
|
|
93
|
+
PRIMITIVE_TYPE.STRICTDATE ||
|
|
94
|
+
dateColumn.func.value.genericType.value.rawType.name ===
|
|
95
|
+
PRIMITIVE_TYPE.DATE,
|
|
96
|
+
|
|
97
|
+
`Can't process ${extractElementNameFromPath(
|
|
98
|
+
calendarFunctionFullPath,
|
|
99
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
100
|
+
calendarFunctionFullPath,
|
|
101
|
+
)}() with first parameter as property expression of type StrictDate`,
|
|
102
|
+
);
|
|
103
|
+
const lambdaParameterName = guaranteeType(
|
|
104
|
+
dateColumn.parametersValues[0],
|
|
105
|
+
VariableExpression,
|
|
106
|
+
).name;
|
|
107
|
+
calendarFunction.setLambdaParameterName(lambdaParameterName);
|
|
108
|
+
|
|
109
|
+
const calendarTypeParameter = guaranteeType(
|
|
110
|
+
expression.parametersValues[1],
|
|
111
|
+
PrimitiveInstanceValue,
|
|
112
|
+
`Can't process ${extractElementNameFromPath(
|
|
113
|
+
calendarFunctionFullPath,
|
|
114
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
115
|
+
calendarFunctionFullPath,
|
|
116
|
+
)}() with second parameter as PrimitiveInstancevalue`,
|
|
117
|
+
);
|
|
118
|
+
assertTrue(
|
|
119
|
+
Object.values(QUERY_BUILDER_CALENDAR_TYPE).find(
|
|
120
|
+
(val) => val === calendarTypeParameter.values[0],
|
|
121
|
+
) !== undefined,
|
|
122
|
+
`Can't process ${extractElementNameFromPath(
|
|
123
|
+
calendarFunctionFullPath,
|
|
124
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
125
|
+
calendarFunctionFullPath,
|
|
126
|
+
)}() calendar types NY and LDN`,
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const endDate = guaranteeType(
|
|
130
|
+
expression.parametersValues[2],
|
|
131
|
+
PrimitiveInstanceValue,
|
|
132
|
+
`Can't process ${extractElementNameFromPath(
|
|
133
|
+
calendarFunctionFullPath,
|
|
134
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
135
|
+
calendarFunctionFullPath,
|
|
136
|
+
)}() with third parameter as PrimitiveInstancevalue`,
|
|
137
|
+
);
|
|
138
|
+
assertTrue(
|
|
139
|
+
endDate.genericType.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
|
|
140
|
+
dateColumn.func.value.genericType.value.rawType.name ===
|
|
141
|
+
PRIMITIVE_TYPE.DATE,
|
|
142
|
+
|
|
143
|
+
`Can't process ${extractElementNameFromPath(
|
|
144
|
+
calendarFunctionFullPath,
|
|
145
|
+
)}() expression: only support ${extractElementNameFromPath(
|
|
146
|
+
calendarFunctionFullPath,
|
|
147
|
+
)}() with third parameter of type StrictDate`,
|
|
148
|
+
);
|
|
149
|
+
|
|
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
|
+
calendarFunction.calendarType = calendarTypeParameter
|
|
161
|
+
.values[0] as QUERY_BUILDER_CALENDAR_TYPE;
|
|
162
|
+
calendarFunction.endDate = endDate;
|
|
163
|
+
calendarFunction.dateColumn = dateColumn;
|
|
164
|
+
assertTrue(
|
|
165
|
+
calendarFunction.isCompatibleWithColumn(
|
|
166
|
+
aggregateColumnState.projectionColumnState,
|
|
167
|
+
),
|
|
168
|
+
`Can't process ${extractElementNameFromPath(
|
|
169
|
+
calendarFunctionFullPath,
|
|
170
|
+
)}() expression: property is not compatible with calendar function`,
|
|
171
|
+
);
|
|
172
|
+
aggregateColumnState.setHideCalendarColumnState(false);
|
|
173
|
+
aggregateColumnState.setCalendarFunction(calendarFunction);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
PRIMITIVE_TYPE,
|
|
19
|
+
type ValueSpecification,
|
|
20
|
+
type SimpleFunctionExpression,
|
|
21
|
+
type AbstractPropertyExpression,
|
|
22
|
+
} from '@finos/legend-graph';
|
|
23
|
+
import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
|
|
24
|
+
import {
|
|
25
|
+
type QueryBuilderProjectionColumnState,
|
|
26
|
+
QueryBuilderSimpleProjectionColumnState,
|
|
27
|
+
} from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
28
|
+
import { QueryBuilderAggregateCalendarFunction } from '../QueryBuilderAggregateCalendarFunction.js';
|
|
29
|
+
import {
|
|
30
|
+
updateAggregateColumnState,
|
|
31
|
+
buildCalendarFunctionExpression,
|
|
32
|
+
} from './QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js';
|
|
33
|
+
import { QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
34
|
+
import { hashArray, type Hashable } from '@finos/legend-shared';
|
|
35
|
+
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
|
36
|
+
|
|
37
|
+
export class QueryBuilderAggregateCalendarFunction_Annualized
|
|
38
|
+
extends QueryBuilderAggregateCalendarFunction
|
|
39
|
+
implements Hashable
|
|
40
|
+
{
|
|
41
|
+
getLabel(): string {
|
|
42
|
+
return 'Annualized';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
isCompatibleWithColumn(
|
|
46
|
+
projectionColumnState: QueryBuilderProjectionColumnState,
|
|
47
|
+
): boolean {
|
|
48
|
+
if (
|
|
49
|
+
projectionColumnState instanceof QueryBuilderSimpleProjectionColumnState
|
|
50
|
+
) {
|
|
51
|
+
const propertyType =
|
|
52
|
+
projectionColumnState.propertyExpressionState.propertyExpression.func
|
|
53
|
+
.value.genericType.value.rawType;
|
|
54
|
+
return (
|
|
55
|
+
[
|
|
56
|
+
PRIMITIVE_TYPE.NUMBER,
|
|
57
|
+
PRIMITIVE_TYPE.INTEGER,
|
|
58
|
+
PRIMITIVE_TYPE.DECIMAL,
|
|
59
|
+
PRIMITIVE_TYPE.FLOAT,
|
|
60
|
+
] as string[]
|
|
61
|
+
).includes(propertyType.path);
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
buildCalendarFunctionExpression(
|
|
67
|
+
p: AbstractPropertyExpression,
|
|
68
|
+
): ValueSpecification {
|
|
69
|
+
return buildCalendarFunctionExpression(
|
|
70
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_ANNUALIZED,
|
|
71
|
+
this.dateColumn,
|
|
72
|
+
this.calendarType,
|
|
73
|
+
this.endDate,
|
|
74
|
+
p,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updateAggregateColumnState(
|
|
79
|
+
expression: SimpleFunctionExpression,
|
|
80
|
+
aggregationColumnState: QueryBuilderAggregateColumnState,
|
|
81
|
+
): void {
|
|
82
|
+
updateAggregateColumnState(
|
|
83
|
+
expression,
|
|
84
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_ANNUALIZED,
|
|
85
|
+
this,
|
|
86
|
+
aggregationColumnState,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
get hashCode(): string {
|
|
91
|
+
return hashArray([
|
|
92
|
+
QUERY_BUILDER_STATE_HASH_STRUCTURE.AGGREGATE_CALENDAR_FUNCTION_ANNUALIZED,
|
|
93
|
+
this.dateColumn ?? '',
|
|
94
|
+
this.calendarType,
|
|
95
|
+
this.endDate,
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
PRIMITIVE_TYPE,
|
|
19
|
+
type ValueSpecification,
|
|
20
|
+
type SimpleFunctionExpression,
|
|
21
|
+
type AbstractPropertyExpression,
|
|
22
|
+
} from '@finos/legend-graph';
|
|
23
|
+
import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
|
|
24
|
+
import {
|
|
25
|
+
type QueryBuilderProjectionColumnState,
|
|
26
|
+
QueryBuilderSimpleProjectionColumnState,
|
|
27
|
+
} from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
28
|
+
import { QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
29
|
+
import { hashArray, type Hashable } from '@finos/legend-shared';
|
|
30
|
+
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
|
31
|
+
import { QueryBuilderAggregateCalendarFunction } from '../QueryBuilderAggregateCalendarFunction.js';
|
|
32
|
+
import {
|
|
33
|
+
updateAggregateColumnState,
|
|
34
|
+
buildCalendarFunctionExpression,
|
|
35
|
+
} from './QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js';
|
|
36
|
+
|
|
37
|
+
export class QueryBuilderAggregateCalendarFunction_Cme
|
|
38
|
+
extends QueryBuilderAggregateCalendarFunction
|
|
39
|
+
implements Hashable
|
|
40
|
+
{
|
|
41
|
+
getLabel(): string {
|
|
42
|
+
return `Current Month Estimate`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
isCompatibleWithColumn(
|
|
46
|
+
projectionColumnState: QueryBuilderProjectionColumnState,
|
|
47
|
+
): boolean {
|
|
48
|
+
if (
|
|
49
|
+
projectionColumnState instanceof QueryBuilderSimpleProjectionColumnState
|
|
50
|
+
) {
|
|
51
|
+
const propertyType =
|
|
52
|
+
projectionColumnState.propertyExpressionState.propertyExpression.func
|
|
53
|
+
.value.genericType.value.rawType;
|
|
54
|
+
return (
|
|
55
|
+
[
|
|
56
|
+
PRIMITIVE_TYPE.NUMBER,
|
|
57
|
+
PRIMITIVE_TYPE.INTEGER,
|
|
58
|
+
PRIMITIVE_TYPE.DECIMAL,
|
|
59
|
+
PRIMITIVE_TYPE.FLOAT,
|
|
60
|
+
] as string[]
|
|
61
|
+
).includes(propertyType.path);
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
buildCalendarFunctionExpression(
|
|
67
|
+
p: AbstractPropertyExpression,
|
|
68
|
+
): ValueSpecification {
|
|
69
|
+
return buildCalendarFunctionExpression(
|
|
70
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CME,
|
|
71
|
+
this.dateColumn,
|
|
72
|
+
this.calendarType,
|
|
73
|
+
this.endDate,
|
|
74
|
+
p,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updateAggregateColumnState(
|
|
79
|
+
expression: SimpleFunctionExpression,
|
|
80
|
+
aggregationColumnState: QueryBuilderAggregateColumnState,
|
|
81
|
+
): void {
|
|
82
|
+
updateAggregateColumnState(
|
|
83
|
+
expression,
|
|
84
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CME,
|
|
85
|
+
this,
|
|
86
|
+
aggregationColumnState,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
get hashCode(): string {
|
|
91
|
+
return hashArray([
|
|
92
|
+
QUERY_BUILDER_STATE_HASH_STRUCTURE.AGGREGATE_CALENDAR_FUNCTION_CME,
|
|
93
|
+
this.dateColumn ?? '',
|
|
94
|
+
this.calendarType,
|
|
95
|
+
this.endDate,
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
PRIMITIVE_TYPE,
|
|
19
|
+
type ValueSpecification,
|
|
20
|
+
type SimpleFunctionExpression,
|
|
21
|
+
type AbstractPropertyExpression,
|
|
22
|
+
} from '@finos/legend-graph';
|
|
23
|
+
import type { QueryBuilderAggregateColumnState } from '../QueryBuilderAggregationState.js';
|
|
24
|
+
import {
|
|
25
|
+
type QueryBuilderProjectionColumnState,
|
|
26
|
+
QueryBuilderSimpleProjectionColumnState,
|
|
27
|
+
} from '../../projection/QueryBuilderProjectionColumnState.js';
|
|
28
|
+
import { QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS } from '../../../../../graph/QueryBuilderMetaModelConst.js';
|
|
29
|
+
import { hashArray, type Hashable } from '@finos/legend-shared';
|
|
30
|
+
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../../../QueryBuilderStateHashUtils.js';
|
|
31
|
+
import { QueryBuilderAggregateCalendarFunction } from '../QueryBuilderAggregateCalendarFunction.js';
|
|
32
|
+
import {
|
|
33
|
+
updateAggregateColumnState,
|
|
34
|
+
buildCalendarFunctionExpression,
|
|
35
|
+
} from './QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js';
|
|
36
|
+
|
|
37
|
+
export class QueryBuilderAggregateCalendarFunction_Cw
|
|
38
|
+
extends QueryBuilderAggregateCalendarFunction
|
|
39
|
+
implements Hashable
|
|
40
|
+
{
|
|
41
|
+
getLabel(): string {
|
|
42
|
+
return `Current Week`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
isCompatibleWithColumn(
|
|
46
|
+
projectionColumnState: QueryBuilderProjectionColumnState,
|
|
47
|
+
): boolean {
|
|
48
|
+
if (
|
|
49
|
+
projectionColumnState instanceof QueryBuilderSimpleProjectionColumnState
|
|
50
|
+
) {
|
|
51
|
+
const propertyType =
|
|
52
|
+
projectionColumnState.propertyExpressionState.propertyExpression.func
|
|
53
|
+
.value.genericType.value.rawType;
|
|
54
|
+
return (
|
|
55
|
+
[
|
|
56
|
+
PRIMITIVE_TYPE.NUMBER,
|
|
57
|
+
PRIMITIVE_TYPE.INTEGER,
|
|
58
|
+
PRIMITIVE_TYPE.DECIMAL,
|
|
59
|
+
PRIMITIVE_TYPE.FLOAT,
|
|
60
|
+
] as string[]
|
|
61
|
+
).includes(propertyType.path);
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
buildCalendarFunctionExpression(
|
|
67
|
+
p: AbstractPropertyExpression,
|
|
68
|
+
): ValueSpecification {
|
|
69
|
+
return buildCalendarFunctionExpression(
|
|
70
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CW,
|
|
71
|
+
this.dateColumn,
|
|
72
|
+
this.calendarType,
|
|
73
|
+
this.endDate,
|
|
74
|
+
p,
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updateAggregateColumnState(
|
|
79
|
+
expression: SimpleFunctionExpression,
|
|
80
|
+
aggregationColumnState: QueryBuilderAggregateColumnState,
|
|
81
|
+
): void {
|
|
82
|
+
updateAggregateColumnState(
|
|
83
|
+
expression,
|
|
84
|
+
QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS.CALENDAR_CW,
|
|
85
|
+
this,
|
|
86
|
+
aggregationColumnState,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
get hashCode(): string {
|
|
91
|
+
return hashArray([
|
|
92
|
+
QUERY_BUILDER_STATE_HASH_STRUCTURE.AGGREGATE_CALENDAR_FUNCTION_CW,
|
|
93
|
+
this.dateColumn ?? '',
|
|
94
|
+
this.calendarType,
|
|
95
|
+
this.endDate,
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
}
|