@finos/legend-query-builder 3.0.8 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +20 -20
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.js +40 -40
- package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
- 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/QueryLoader.d.ts +30 -0
- package/lib/components/QueryLoader.d.ts.map +1 -0
- package/lib/components/QueryLoader.js +160 -0
- package/lib/components/QueryLoader.js.map +1 -0
- 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/components/shared/QueryBuilderPanelIssueCountBadge.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +2 -1
- package/lib/components/shared/QueryBuilderPanelIssueCountBadge.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/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.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/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +30 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.js +17 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.js.map +1 -0
- package/lib/stores/QueryLoaderState.d.ts +67 -0
- package/lib/stores/QueryLoaderState.d.ts.map +1 -0
- package/lib/stores/QueryLoaderState.js +205 -0
- package/lib/stores/QueryLoaderState.js.map +1 -0
- 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/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +7 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/package.json +8 -8
- package/src/__lib__/QueryBuilderTelemetryHelper.ts +40 -59
- package/src/components/QueryBuilder.tsx +79 -0
- package/src/components/QueryLoader.tsx +501 -0
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +456 -92
- package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +2 -1
- 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/index.ts +3 -0
- 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/QueryBuilder_LegendApplicationPlugin_Extension.ts +36 -0
- package/src/stores/QueryLoaderState.ts +298 -0
- 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/src/stores/shared/ValueSpecificationEditorHelper.ts +39 -2
- package/tsconfig.json +38 -0
@@ -36,6 +36,11 @@ import {
|
|
36
36
|
TrashIcon,
|
37
37
|
PanelDnDEntry,
|
38
38
|
PanelDnDEntryDragHandle,
|
39
|
+
CalendarIcon,
|
40
|
+
CalendarClockIcon,
|
41
|
+
CustomSelectorInput,
|
42
|
+
PURE_FunctionIcon,
|
43
|
+
PanelEntryDropZonePlaceholder,
|
39
44
|
} from '@finos/legend-art';
|
40
45
|
import {
|
41
46
|
type QueryBuilderExplorerTreeDragSource,
|
@@ -61,6 +66,18 @@ import {
|
|
61
66
|
generateFunctionCallString,
|
62
67
|
LAMBDA_PIPE,
|
63
68
|
VARIABLE_REFERENCE_TOKEN,
|
69
|
+
AbstractPropertyExpression,
|
70
|
+
PRIMITIVE_TYPE,
|
71
|
+
Property,
|
72
|
+
PropertyExplicitReference,
|
73
|
+
VariableExpression,
|
74
|
+
Multiplicity,
|
75
|
+
type ValueSpecification,
|
76
|
+
PrimitiveType,
|
77
|
+
GenericType,
|
78
|
+
GenericTypeExplicitReference,
|
79
|
+
observe_PrimitiveInstanceValue,
|
80
|
+
PrimitiveInstanceValue,
|
64
81
|
} from '@finos/legend-graph';
|
65
82
|
import {
|
66
83
|
type QueryBuilderFunctionsExplorerDragSource,
|
@@ -73,7 +90,73 @@ import { LambdaEditor } from '../shared/LambdaEditor.js';
|
|
73
90
|
import {
|
74
91
|
type QueryBuilderVariableDragSource,
|
75
92
|
QUERY_BUILDER_VARIABLE_DND_TYPE,
|
93
|
+
BasicValueSpecificationEditor,
|
76
94
|
} from '../shared/BasicValueSpecificationEditor.js';
|
95
|
+
import { type QueryBuilderAggregateCalendarFunction } from '../../stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js';
|
96
|
+
import {
|
97
|
+
instanceValue_setValues,
|
98
|
+
propertyExpression_setFunc,
|
99
|
+
} from '../../stores/shared/ValueSpecificationModifierHelper.js';
|
100
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
101
|
+
import { getPropertyChainName } from '../../stores/QueryBuilderPropertyEditorState.js';
|
102
|
+
import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
|
103
|
+
import { QUERY_BUILDER_CALENDAR_TYPE } from '../../graph-manager/QueryBuilderConst.js';
|
104
|
+
|
105
|
+
export type CalendarFunctionOption = {
|
106
|
+
label: string | React.ReactNode;
|
107
|
+
value: QueryBuilderAggregateCalendarFunction;
|
108
|
+
};
|
109
|
+
|
110
|
+
export const buildCalendarFunctionOption = (
|
111
|
+
calendarFunction: QueryBuilderAggregateCalendarFunction,
|
112
|
+
): CalendarFunctionOption => ({
|
113
|
+
label: (
|
114
|
+
<div
|
115
|
+
className="query-builder__projection__calendar__function__label"
|
116
|
+
title={calendarFunction.getLabel()}
|
117
|
+
>
|
118
|
+
<PURE_FunctionIcon />
|
119
|
+
<div className="query-builder__projection__calendar__function__label__title">
|
120
|
+
{calendarFunction.getLabel()}
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
),
|
124
|
+
value: calendarFunction,
|
125
|
+
});
|
126
|
+
|
127
|
+
export type CalendarFunctionDateColumnOption = {
|
128
|
+
label: string;
|
129
|
+
value: AbstractPropertyExpression;
|
130
|
+
};
|
131
|
+
|
132
|
+
export const buildCalendarFunctionDateColumnOption = (
|
133
|
+
dateColumn: Property | AbstractPropertyExpression,
|
134
|
+
parameter: VariableExpression,
|
135
|
+
humanizeLabel: boolean,
|
136
|
+
): CalendarFunctionDateColumnOption => {
|
137
|
+
if (dateColumn instanceof Property) {
|
138
|
+
const propertyExpression = new AbstractPropertyExpression('');
|
139
|
+
propertyExpression_setFunc(
|
140
|
+
propertyExpression,
|
141
|
+
PropertyExplicitReference.create(guaranteeNonNullable(dateColumn)),
|
142
|
+
);
|
143
|
+
propertyExpression.parametersValues = [parameter];
|
144
|
+
return {
|
145
|
+
label: getPropertyChainName(propertyExpression, humanizeLabel),
|
146
|
+
value: propertyExpression,
|
147
|
+
};
|
148
|
+
} else {
|
149
|
+
return {
|
150
|
+
label: getPropertyChainName(dateColumn, humanizeLabel),
|
151
|
+
value: dateColumn,
|
152
|
+
};
|
153
|
+
}
|
154
|
+
};
|
155
|
+
|
156
|
+
export type CalendarTypeOption = {
|
157
|
+
label: string;
|
158
|
+
value: QUERY_BUILDER_CALENDAR_TYPE;
|
159
|
+
};
|
77
160
|
|
78
161
|
const QueryBuilderProjectionColumnContextMenu = observer(
|
79
162
|
forwardRef<
|
@@ -224,6 +307,8 @@ const QueryBuilderDerivationProjectionColumnEditor = observer(
|
|
224
307
|
const QueryBuilderProjectionColumnEditor = observer(
|
225
308
|
(props: { projectionColumnState: QueryBuilderProjectionColumnState }) => {
|
226
309
|
const handleRef = useRef<HTMLDivElement>(null);
|
310
|
+
const applicationStore = useApplicationStore();
|
311
|
+
|
227
312
|
const ref = useRef<HTMLDivElement>(null);
|
228
313
|
const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] =
|
229
314
|
useState(false);
|
@@ -232,6 +317,7 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
232
317
|
|
233
318
|
const { projectionColumnState } = props;
|
234
319
|
const tdsState = projectionColumnState.tdsState;
|
320
|
+
const isCalendarEnabled = tdsState.queryBuilderState.isCalendarEnabled;
|
235
321
|
const isRemovalDisabled = tdsState.isColumnInUse(projectionColumnState);
|
236
322
|
|
237
323
|
const removeColumn = (): void =>
|
@@ -258,6 +344,123 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
258
344
|
projectionColumnState,
|
259
345
|
);
|
260
346
|
|
347
|
+
// calendar
|
348
|
+
const aggregateCalendarFunctionDateColumns =
|
349
|
+
tdsState.queryBuilderState.class?.properties.filter((p) => {
|
350
|
+
const _type = p.genericType.value.rawType.name;
|
351
|
+
if (
|
352
|
+
_type === PRIMITIVE_TYPE.DATE ||
|
353
|
+
_type === PRIMITIVE_TYPE.STRICTDATE
|
354
|
+
) {
|
355
|
+
return true;
|
356
|
+
}
|
357
|
+
return false;
|
358
|
+
}) ?? [];
|
359
|
+
const calendarFunctionDateColumnOptions =
|
360
|
+
aggregateCalendarFunctionDateColumns.map((option) =>
|
361
|
+
buildCalendarFunctionDateColumnOption(
|
362
|
+
option,
|
363
|
+
new VariableExpression(
|
364
|
+
aggregateColumnState?.calendarFunction?.lambdaParameterName ??
|
365
|
+
DEFAULT_LAMBDA_VARIABLE_NAME,
|
366
|
+
Multiplicity.ONE,
|
367
|
+
),
|
368
|
+
tdsState.queryBuilderState.explorerState.humanizePropertyName,
|
369
|
+
),
|
370
|
+
);
|
371
|
+
const calendarTypeOptions = Object.values(QUERY_BUILDER_CALENDAR_TYPE).map(
|
372
|
+
(ct) => ({
|
373
|
+
label: (
|
374
|
+
<div className="query-builder__projection__calendar__type__option">
|
375
|
+
<CalendarIcon />
|
376
|
+
<div className="query-builder__projection__calendar__type__option__title">
|
377
|
+
{ct}
|
378
|
+
</div>
|
379
|
+
</div>
|
380
|
+
),
|
381
|
+
value: ct,
|
382
|
+
}),
|
383
|
+
);
|
384
|
+
const selectedCalendarTypeOption = aggregateColumnState?.calendarFunction
|
385
|
+
?.calendarType
|
386
|
+
? {
|
387
|
+
label: (
|
388
|
+
<div className="query-builder__projection__calendar__type__option">
|
389
|
+
<CalendarIcon />
|
390
|
+
<div className="query-builder__projection__calendar__type__option__title">
|
391
|
+
{aggregateColumnState.calendarFunction.calendarType}
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
),
|
395
|
+
value: aggregateColumnState.calendarFunction.calendarType,
|
396
|
+
}
|
397
|
+
: null;
|
398
|
+
const onCalendarTypeOptionChange = (option: CalendarTypeOption): void => {
|
399
|
+
if (
|
400
|
+
option.value !== aggregateColumnState?.calendarFunction?.calendarType
|
401
|
+
) {
|
402
|
+
aggregateColumnState?.calendarFunction?.setCalendarType(option.value);
|
403
|
+
}
|
404
|
+
};
|
405
|
+
const defaultEndDate = observe_PrimitiveInstanceValue(
|
406
|
+
new PrimitiveInstanceValue(
|
407
|
+
GenericTypeExplicitReference.create(
|
408
|
+
new GenericType(PrimitiveType.STRICTDATE),
|
409
|
+
),
|
410
|
+
),
|
411
|
+
tdsState.queryBuilderState.observerContext,
|
412
|
+
);
|
413
|
+
instanceValue_setValues(
|
414
|
+
defaultEndDate,
|
415
|
+
[generateDefaultValueForPrimitiveType(PRIMITIVE_TYPE.STRICTDATE)],
|
416
|
+
tdsState.queryBuilderState.observerContext,
|
417
|
+
);
|
418
|
+
const resetEndDate = (): void => {
|
419
|
+
if (aggregateColumnState?.calendarFunction) {
|
420
|
+
aggregateColumnState.calendarFunction.setEndDate(defaultEndDate);
|
421
|
+
}
|
422
|
+
};
|
423
|
+
const aggregateCalendarFunctions =
|
424
|
+
tdsState.aggregationState.calendarFunctions.filter((cf) =>
|
425
|
+
cf.isCompatibleWithColumn(projectionColumnState),
|
426
|
+
);
|
427
|
+
const calendarFunctionOptions = aggregateCalendarFunctions.map(
|
428
|
+
buildCalendarFunctionOption,
|
429
|
+
);
|
430
|
+
const selectedCalendarFunctionOption =
|
431
|
+
aggregateColumnState?.calendarFunction
|
432
|
+
? buildCalendarFunctionOption(aggregateColumnState.calendarFunction)
|
433
|
+
: null;
|
434
|
+
const onCalendarFunctionOptionChange = (
|
435
|
+
option: CalendarFunctionOption | null,
|
436
|
+
): void => {
|
437
|
+
if (option?.value !== aggregateColumnState?.calendarFunction) {
|
438
|
+
const lambdaParameterName =
|
439
|
+
aggregateColumnState?.calendarFunction?.lambdaParameterName;
|
440
|
+
aggregateColumnState?.setCalendarFunction(option?.value ?? undefined);
|
441
|
+
if (lambdaParameterName && aggregateColumnState.calendarFunction) {
|
442
|
+
aggregateColumnState.calendarFunction.setLambdaParameterName(
|
443
|
+
lambdaParameterName,
|
444
|
+
);
|
445
|
+
}
|
446
|
+
if (aggregateColumnState?.calendarFunction) {
|
447
|
+
if (calendarFunctionDateColumnOptions[0]) {
|
448
|
+
aggregateColumnState.calendarFunction.setDateColumn(
|
449
|
+
guaranteeNonNullable(calendarFunctionDateColumnOptions[0]).value,
|
450
|
+
);
|
451
|
+
} else {
|
452
|
+
applicationStore.notificationService.notifyWarning(
|
453
|
+
'Please provide the date column field for the calendar function',
|
454
|
+
);
|
455
|
+
}
|
456
|
+
aggregateColumnState.calendarFunction.setCalendarType(
|
457
|
+
guaranteeNonNullable(calendarTypeOptions[0]).value,
|
458
|
+
);
|
459
|
+
aggregateColumnState.calendarFunction.setEndDate(defaultEndDate);
|
460
|
+
}
|
461
|
+
}
|
462
|
+
};
|
463
|
+
|
261
464
|
// Drag and Drop
|
262
465
|
const handleHover = useCallback(
|
263
466
|
(
|
@@ -335,6 +538,61 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
335
538
|
|
336
539
|
useDragPreviewLayer(dragPreviewConnector);
|
337
540
|
|
541
|
+
const toggleHideCalendarColumnState = (): void => {
|
542
|
+
if (aggregateColumnState) {
|
543
|
+
aggregateColumnState.setHideCalendarColumnState(
|
544
|
+
!aggregateColumnState.hideCalendarColumnState,
|
545
|
+
);
|
546
|
+
}
|
547
|
+
};
|
548
|
+
|
549
|
+
// Drag and Drop on calendar function date column
|
550
|
+
const handleDrop = useCallback(
|
551
|
+
(item: QueryBuilderExplorerTreeDragSource, type: string): void => {
|
552
|
+
if (type === QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY) {
|
553
|
+
if (
|
554
|
+
item.node.type.name === PRIMITIVE_TYPE.DATE ||
|
555
|
+
item.node.type.name === PRIMITIVE_TYPE.STRICTDATE
|
556
|
+
) {
|
557
|
+
aggregateColumnState?.calendarFunction?.setDateColumn(
|
558
|
+
buildPropertyExpressionFromExplorerTreeNodeData(
|
559
|
+
item.node,
|
560
|
+
tdsState.queryBuilderState.explorerState,
|
561
|
+
aggregateColumnState.calendarFunction.lambdaParameterName,
|
562
|
+
),
|
563
|
+
);
|
564
|
+
} else {
|
565
|
+
applicationStore.notificationService.notifyWarning(
|
566
|
+
`${item.node.type.name} type is not compaible with calendar function date column`,
|
567
|
+
);
|
568
|
+
}
|
569
|
+
}
|
570
|
+
},
|
571
|
+
[
|
572
|
+
aggregateColumnState?.calendarFunction,
|
573
|
+
applicationStore.notificationService,
|
574
|
+
tdsState.queryBuilderState.explorerState,
|
575
|
+
],
|
576
|
+
);
|
577
|
+
const [{ isDragOver }, dropTargetConnector] = useDrop<
|
578
|
+
QueryBuilderExplorerTreeDragSource,
|
579
|
+
void,
|
580
|
+
{ isDragOver: boolean }
|
581
|
+
>(
|
582
|
+
() => ({
|
583
|
+
accept: [QUERY_BUILDER_EXPLORER_TREE_DND_TYPE.PRIMITIVE_PROPERTY],
|
584
|
+
drop: (item, monitor): void => {
|
585
|
+
if (!monitor.didDrop()) {
|
586
|
+
handleDrop(item, monitor.getItemType() as string);
|
587
|
+
} // prevent drop event propagation to accomondate for nested DnD
|
588
|
+
},
|
589
|
+
collect: (monitor) => ({
|
590
|
+
isDragOver: monitor.isOver({ shallow: true }),
|
591
|
+
}),
|
592
|
+
}),
|
593
|
+
[handleDrop],
|
594
|
+
);
|
595
|
+
|
338
596
|
return (
|
339
597
|
<PanelDnDEntry
|
340
598
|
ref={ref}
|
@@ -361,107 +619,213 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
361
619
|
onOpen={onContextMenuOpen}
|
362
620
|
onClose={onContextMenuClose}
|
363
621
|
>
|
364
|
-
<
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
<div className="query-builder__projection__column__name">
|
370
|
-
<InputWithInlineValidation
|
371
|
-
className="query-builder__projection__column__name__input input-group__input"
|
372
|
-
spellCheck={false}
|
373
|
-
value={projectionColumnState.columnName}
|
374
|
-
onChange={changeColumnName}
|
375
|
-
error={isDuplicatedColumnName ? 'Duplicated column' : undefined}
|
622
|
+
<div className="query-builder__projection__column__container">
|
623
|
+
<PanelDnDEntryDragHandle
|
624
|
+
isBeingDragged={isBeingDragged}
|
625
|
+
dropTargetConnector={handleRef}
|
626
|
+
className="query-builder__projection__column__drag-handle__container"
|
376
627
|
/>
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
628
|
+
<div className="query-builder__projection__column__name">
|
629
|
+
<InputWithInlineValidation
|
630
|
+
className="query-builder__projection__column__name__input input-group__input"
|
631
|
+
spellCheck={false}
|
632
|
+
value={projectionColumnState.columnName}
|
633
|
+
onChange={changeColumnName}
|
634
|
+
error={isDuplicatedColumnName ? 'Duplicated column' : undefined}
|
383
635
|
/>
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
</div>
|
392
|
-
<div className="query-builder__projection__column__aggregate">
|
393
|
-
<div className="query-builder__projection__column__aggregate__operator">
|
394
|
-
{aggregateColumnState && (
|
395
|
-
<div className="query-builder__projection__column__aggregate__operator__label">
|
396
|
-
{aggregateColumnState.operator.getLabel(
|
397
|
-
projectionColumnState,
|
398
|
-
)}
|
399
|
-
</div>
|
636
|
+
</div>
|
637
|
+
<div className="query-builder__projection__column__value">
|
638
|
+
{projectionColumnState instanceof
|
639
|
+
QueryBuilderSimpleProjectionColumnState && (
|
640
|
+
<QueryBuilderSimpleProjectionColumnEditor
|
641
|
+
projectionColumnState={projectionColumnState}
|
642
|
+
/>
|
400
643
|
)}
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
644
|
+
{projectionColumnState instanceof
|
645
|
+
QueryBuilderDerivationProjectionColumnState && (
|
646
|
+
<QueryBuilderDerivationProjectionColumnEditor
|
647
|
+
projectionColumnState={projectionColumnState}
|
648
|
+
/>
|
649
|
+
)}
|
650
|
+
</div>
|
651
|
+
<div className="query-builder__projection__column__aggregate">
|
652
|
+
<div className="query-builder__projection__column__aggregate__operator">
|
653
|
+
{aggregateColumnState && (
|
654
|
+
<div className="query-builder__projection__column__aggregate__operator__label">
|
655
|
+
{aggregateColumnState.operator.getLabel(
|
656
|
+
projectionColumnState,
|
414
657
|
)}
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
658
|
+
</div>
|
659
|
+
)}
|
660
|
+
{isCalendarEnabled &&
|
661
|
+
aggregateColumnState &&
|
662
|
+
aggregateCalendarFunctions.length > 0 && (
|
663
|
+
<div
|
664
|
+
className={
|
665
|
+
aggregateColumnState.hideCalendarColumnState
|
666
|
+
? 'query-builder__projection__column__aggregate__calendar--clock--icon__hidden'
|
667
|
+
: 'query-builder__projection__column__aggregate__calendar--clock--icon'
|
668
|
+
}
|
669
|
+
onClick={toggleHideCalendarColumnState}
|
670
|
+
title="Click to select calendar function"
|
671
|
+
>
|
672
|
+
<CalendarClockIcon />
|
673
|
+
</div>
|
674
|
+
)}
|
675
|
+
<DropdownMenu
|
676
|
+
className="query-builder__projection__column__aggregate__operator__dropdown"
|
677
|
+
title="Choose Aggregate Operator..."
|
678
|
+
disabled={!aggreateOperators.length}
|
679
|
+
content={
|
680
|
+
<MenuContent>
|
681
|
+
{aggregateColumnState && (
|
682
|
+
<MenuContentItem
|
683
|
+
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
684
|
+
onClick={changeOperator(undefined)}
|
685
|
+
>
|
686
|
+
(none)
|
687
|
+
</MenuContentItem>
|
688
|
+
)}
|
689
|
+
{aggreateOperators.map((op) => (
|
690
|
+
<MenuContentItem
|
691
|
+
key={op.uuid}
|
692
|
+
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
693
|
+
onClick={changeOperator(op)}
|
694
|
+
>
|
695
|
+
{op.getLabel(projectionColumnState)}
|
696
|
+
</MenuContentItem>
|
697
|
+
))}
|
698
|
+
</MenuContent>
|
699
|
+
}
|
700
|
+
menuProps={{
|
701
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
702
|
+
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
703
|
+
elevation: 7,
|
704
|
+
}}
|
705
|
+
>
|
706
|
+
<div
|
707
|
+
className={clsx(
|
708
|
+
'query-builder__projection__column__aggregate__operator__badge',
|
709
|
+
{
|
710
|
+
'query-builder__projection__column__aggregate__operator__badge--activated':
|
711
|
+
Boolean(aggregateColumnState),
|
712
|
+
},
|
713
|
+
)}
|
714
|
+
>
|
715
|
+
<SigmaIcon />
|
716
|
+
</div>
|
717
|
+
<div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
|
718
|
+
<CaretDownIcon />
|
719
|
+
</div>
|
720
|
+
</DropdownMenu>
|
721
|
+
</div>
|
722
|
+
</div>
|
723
|
+
<div className="query-builder__projection__column__actions">
|
724
|
+
<button
|
725
|
+
className="query-builder__projection__column__action"
|
726
|
+
tabIndex={-1}
|
727
|
+
onClick={removeColumn}
|
728
|
+
disabled={isRemovalDisabled}
|
729
|
+
title={
|
730
|
+
isRemovalDisabled
|
731
|
+
? // TODO: We may want to provide a list of all places where column is in use
|
732
|
+
"This column is used and can't be removed"
|
733
|
+
: 'Remove'
|
425
734
|
}
|
426
|
-
menuProps={{
|
427
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
428
|
-
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
429
|
-
elevation: 7,
|
430
|
-
}}
|
431
735
|
>
|
736
|
+
<TimesIcon />
|
737
|
+
</button>
|
738
|
+
</div>
|
739
|
+
</div>
|
740
|
+
{isCalendarEnabled &&
|
741
|
+
aggregateColumnState &&
|
742
|
+
aggregateCalendarFunctions.length > 0 && (
|
743
|
+
<div
|
744
|
+
className={clsx(
|
745
|
+
'query-builder__projection__calendar__container',
|
746
|
+
{
|
747
|
+
'query-builder__projection__calendar__container--hidden':
|
748
|
+
aggregateColumnState.hideCalendarColumnState,
|
749
|
+
},
|
750
|
+
)}
|
751
|
+
>
|
752
|
+
<div data-testid="test">
|
753
|
+
<CustomSelectorInput
|
754
|
+
className="query-builder__projection__calendar__function"
|
755
|
+
options={calendarFunctionOptions}
|
756
|
+
onChange={onCalendarFunctionOptionChange}
|
757
|
+
value={selectedCalendarFunctionOption}
|
758
|
+
placeholder={'Select Calendar Function'}
|
759
|
+
isClearable={true}
|
760
|
+
escapeClearsValue={true}
|
761
|
+
darkMode={
|
762
|
+
!applicationStore.layoutService
|
763
|
+
.TEMPORARY__isLightColorThemeEnabled
|
764
|
+
}
|
765
|
+
/>
|
766
|
+
</div>
|
767
|
+
<div className="query-builder__projection__calendar__value">
|
768
|
+
<BasicValueSpecificationEditor
|
769
|
+
valueSpecification={
|
770
|
+
aggregateColumnState.calendarFunction?.endDate ??
|
771
|
+
defaultEndDate
|
772
|
+
}
|
773
|
+
setValueSpecification={(val: ValueSpecification): void => {
|
774
|
+
if (val instanceof PrimitiveInstanceValue) {
|
775
|
+
aggregateColumnState.calendarFunction?.setEndDate(val);
|
776
|
+
}
|
777
|
+
}}
|
778
|
+
graph={tdsState.queryBuilderState.graphManagerState.graph}
|
779
|
+
obseverContext={tdsState.queryBuilderState.observerContext}
|
780
|
+
typeCheckOption={{
|
781
|
+
expectedType: PrimitiveType.STRICTDATE,
|
782
|
+
}}
|
783
|
+
className="query-builder__parameters__value__editor"
|
784
|
+
resetValue={resetEndDate}
|
785
|
+
/>
|
786
|
+
</div>
|
432
787
|
<div
|
433
|
-
className=
|
434
|
-
|
435
|
-
{
|
436
|
-
'query-builder__projection__column__aggregate__operator__badge--activated':
|
437
|
-
Boolean(aggregateColumnState),
|
438
|
-
},
|
439
|
-
)}
|
788
|
+
className="query-builder__projection__calendar__date__column"
|
789
|
+
ref={dropTargetConnector}
|
440
790
|
>
|
441
|
-
<
|
442
|
-
|
443
|
-
|
444
|
-
|
791
|
+
<PanelEntryDropZonePlaceholder
|
792
|
+
showPlaceholder={isDragOver}
|
793
|
+
label="Change Date Column"
|
794
|
+
className="query-builder__projection__calendar__date__column__dnd__placeholder"
|
795
|
+
>
|
796
|
+
{aggregateColumnState.calendarFunction?.dateColumn ? (
|
797
|
+
<div className="query-builder__projection__calendar__date__column__label__box">
|
798
|
+
<div className="query-builder__projection__calendar__date__column__prefix">
|
799
|
+
on
|
800
|
+
</div>
|
801
|
+
<div className="query-builder__projection__calendar__date__column__label">
|
802
|
+
{getPropertyChainName(
|
803
|
+
aggregateColumnState.calendarFunction.dateColumn,
|
804
|
+
tdsState.queryBuilderState.explorerState
|
805
|
+
.humanizePropertyName,
|
806
|
+
)}
|
807
|
+
</div>
|
808
|
+
</div>
|
809
|
+
) : (
|
810
|
+
<div className="query-builder__projection__calendar__date__column__dnd__placeholder">
|
811
|
+
Drag and drop date column here
|
812
|
+
</div>
|
813
|
+
)}
|
814
|
+
</PanelEntryDropZonePlaceholder>
|
445
815
|
</div>
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
: 'Remove'
|
460
|
-
}
|
461
|
-
>
|
462
|
-
<TimesIcon />
|
463
|
-
</button>
|
464
|
-
</div>
|
816
|
+
<CustomSelectorInput
|
817
|
+
className="query-builder__projection__calendar__type"
|
818
|
+
options={calendarTypeOptions}
|
819
|
+
onChange={onCalendarTypeOptionChange}
|
820
|
+
value={selectedCalendarTypeOption ?? calendarTypeOptions[0]}
|
821
|
+
placeholder={'Select calendar type'}
|
822
|
+
darkMode={
|
823
|
+
!applicationStore.layoutService
|
824
|
+
.TEMPORARY__isLightColorThemeEnabled
|
825
|
+
}
|
826
|
+
/>
|
827
|
+
</div>
|
828
|
+
)}
|
465
829
|
</ContextMenu>
|
466
830
|
</PanelDnDEntry>
|
467
831
|
);
|
@@ -15,6 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import { TimesCircleIcon } from '@finos/legend-art';
|
18
|
+
import { quantifyList } from '@finos/legend-shared';
|
18
19
|
|
19
20
|
export const QueryBuilderPanelIssueCountBadge: React.FC<{
|
20
21
|
issues: string[] | undefined;
|
@@ -23,7 +24,7 @@ export const QueryBuilderPanelIssueCountBadge: React.FC<{
|
|
23
24
|
if (!issues) {
|
24
25
|
return null;
|
25
26
|
}
|
26
|
-
const labelText =
|
27
|
+
const labelText = quantifyList(issues, 'issue');
|
27
28
|
return (
|
28
29
|
<div
|
29
30
|
className="query-builder-panel-issue-count-badge"
|
@@ -28,6 +28,40 @@ export enum QUERY_BUILDER_PURE_PATH {
|
|
28
28
|
SERIALIZE_CONFIG = 'meta::pure::graphFetch::execution::AlloySerializationConfig',
|
29
29
|
}
|
30
30
|
|
31
|
+
export enum QUERY_BUILDER_SUPPORTED_CALENDAR_AGGREGATION_FUNCTIONS {
|
32
|
+
CALENDAR_ANNUALIZED = 'meta::pure::functions::date::calendar::annualized',
|
33
|
+
CALENDAR_CME = ' meta::pure::functions::date::calendar::cme',
|
34
|
+
CALENDAR_CW = 'meta::pure::functions::date::calendar::cw',
|
35
|
+
CALENDAR_CW_FM = 'meta::pure::functions::date::calendar::cw_fm',
|
36
|
+
CALENDAR_CY_MINUS2 = 'meta::pure::functions::date::calendar::CYMinus2',
|
37
|
+
CALENDAR_CY_MINUS3 = 'meta::pure::functions::date::calendar::CYMinus3',
|
38
|
+
CALENDAR_MTD = 'meta::pure::functions::date::calendar::mtd',
|
39
|
+
CALENDAR_P12WA = 'meta::pure::functions::date::calendar::p12wa',
|
40
|
+
CALENDAR_P12WTD = 'meta::pure::functions::date::calendar::p12wtd',
|
41
|
+
CALENDAR_P4WA = 'meta::pure::functions::date::calendar::p4wa',
|
42
|
+
CALENDAR_P4WTD = 'meta::pure::functions::date::calendar::p4wtd',
|
43
|
+
CALENDAR_P52WTD = 'meta::pure::functions::date::calendar::p52wtd',
|
44
|
+
CALENDAR_P52WA = 'meta::pure::functions::date::calendar::p52wa',
|
45
|
+
CALENDAR_PMA = 'meta::pure::functions::date::calendar::pma',
|
46
|
+
CALENDAR_PMTD = 'meta::pure::functions::date::calendar::pmtd',
|
47
|
+
CALENDAR_PQTD = 'meta::pure::functions::date::calendar::pqtd',
|
48
|
+
CALENDAR_PRIOR_DAY = 'meta::pure::functions::date::calendar::priorDay',
|
49
|
+
CALENDAR_PRIOR_YEAR = 'meta::pure::functions::date::calendar::priorYear',
|
50
|
+
CALENDAR_PW = 'meta::pure::functions::date::calendar::pw',
|
51
|
+
CALENDAR_PW_FM = 'meta::pure::functions::date::calendar::pw_fm',
|
52
|
+
CALENDAR_PWA = 'meta::pure::functions::date::calendar::pwa',
|
53
|
+
CALENDAR_PWTD = 'meta::pure::functions::date::calendar::pwtd',
|
54
|
+
CALENDAR_PYMTD = 'meta::pure::functions::date::calendar::pymtd',
|
55
|
+
CALENDAR_PYQTD = 'meta::pure::functions::date::calendar::pyqtd',
|
56
|
+
CALENDAR_PYTD = 'meta::pure::functions::date::calendar::pytd',
|
57
|
+
CALENDAR_PYWA = 'meta::pure::functions::date::calendar::pywa',
|
58
|
+
CALENDAR_PYWTD = 'meta::pure::functions::date::calendar::pywtd',
|
59
|
+
CALENDAR_QTD = 'meta::pure::functions::date::calendar::qtd',
|
60
|
+
CALENDAR_REPORT_END_DAY = 'meta::pure::functions::date::calendar::reportEndDay',
|
61
|
+
CALENDAR_WTD = 'meta::pure::functions::date::calendar::wtd',
|
62
|
+
CALENDAR_YTD = 'meta::pure::functions::date::calendar::ytd',
|
63
|
+
}
|
64
|
+
|
31
65
|
export enum QUERY_BUILDER_SUPPORTED_FUNCTIONS {
|
32
66
|
AND = 'meta::pure::functions::boolean::and',
|
33
67
|
EXISTS = 'meta::pure::functions::collection::exists',
|