@finos/legend-query-builder 3.0.7 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderDocumentation.d.ts +0 -1
- package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderDocumentation.js +0 -1
- package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
- package/lib/__lib__/QueryBuilderEvent.d.ts +18 -0
- package/lib/__lib__/QueryBuilderEvent.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderEvent.js +20 -0
- package/lib/__lib__/QueryBuilderEvent.js.map +1 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +14 -0
- package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.js +43 -1
- package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts +0 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +74 -36
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +0 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts +0 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +0 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts +0 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +0 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts +0 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts +0 -1
- package/lib/components/QueryBuilderUnsupportedQueryEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderFunctionsExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts +0 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderFetchStructurePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +13 -3
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts +17 -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/fetch-structure/QueryBuilderTDSWindowPanel.d.ts +0 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +2 -2
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts +0 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +14 -3
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts +0 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts +0 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js +2 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +0 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.d.ts +0 -1
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.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 +4 -4
- package/lib/stores/QueryBuilderState.d.ts +3 -2
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +12 -6
- 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 +10 -10
- package/src/__lib__/QueryBuilderDocumentation.ts +0 -2
- package/src/__lib__/QueryBuilderEvent.ts +20 -0
- package/src/__lib__/QueryBuilderTelemetryHelper.ts +131 -1
- package/src/components/QueryBuilder.tsx +226 -188
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +96 -60
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +456 -94
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +2 -4
- package/src/components/filter/QueryBuilderFilterPanel.tsx +102 -60
- package/src/components/shared/LambdaParameterValuesEditor.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/stores/QueryBuilderState.ts +12 -9
- 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
@@ -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,109 +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
|
-
validationErrorMessage={
|
376
|
-
isDuplicatedColumnName ? 'Duplicated column' : undefined
|
377
|
-
}
|
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"
|
378
627
|
/>
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
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}
|
385
635
|
/>
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
</div>
|
394
|
-
<div className="query-builder__projection__column__aggregate">
|
395
|
-
<div className="query-builder__projection__column__aggregate__operator">
|
396
|
-
{aggregateColumnState && (
|
397
|
-
<div className="query-builder__projection__column__aggregate__operator__label">
|
398
|
-
{aggregateColumnState.operator.getLabel(
|
399
|
-
projectionColumnState,
|
400
|
-
)}
|
401
|
-
</div>
|
636
|
+
</div>
|
637
|
+
<div className="query-builder__projection__column__value">
|
638
|
+
{projectionColumnState instanceof
|
639
|
+
QueryBuilderSimpleProjectionColumnState && (
|
640
|
+
<QueryBuilderSimpleProjectionColumnEditor
|
641
|
+
projectionColumnState={projectionColumnState}
|
642
|
+
/>
|
402
643
|
)}
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
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,
|
416
657
|
)}
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
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'
|
427
734
|
}
|
428
|
-
menuProps={{
|
429
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
430
|
-
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
431
|
-
elevation: 7,
|
432
|
-
}}
|
433
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>
|
434
787
|
<div
|
435
|
-
className=
|
436
|
-
|
437
|
-
{
|
438
|
-
'query-builder__projection__column__aggregate__operator__badge--activated':
|
439
|
-
Boolean(aggregateColumnState),
|
440
|
-
},
|
441
|
-
)}
|
788
|
+
className="query-builder__projection__calendar__date__column"
|
789
|
+
ref={dropTargetConnector}
|
442
790
|
>
|
443
|
-
<
|
444
|
-
|
445
|
-
|
446
|
-
|
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>
|
447
815
|
</div>
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
: 'Remove'
|
462
|
-
}
|
463
|
-
>
|
464
|
-
<TimesIcon />
|
465
|
-
</button>
|
466
|
-
</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
|
+
)}
|
467
829
|
</ContextMenu>
|
468
830
|
</PanelDnDEntry>
|
469
831
|
);
|
@@ -513,9 +513,7 @@ const QueryBuilderWindowColumnModalEditor = observer(
|
|
513
513
|
spellCheck={false}
|
514
514
|
value={windowColumnState.columnName}
|
515
515
|
onChange={changeColumnName}
|
516
|
-
|
517
|
-
isDuplicatedColumnName ? 'Duplicated column' : undefined
|
518
|
-
}
|
516
|
+
error={isDuplicatedColumnName ? 'Duplicated column' : undefined}
|
519
517
|
/>
|
520
518
|
</PanelFormSection>
|
521
519
|
</div>
|
@@ -1087,7 +1085,7 @@ const QueryBuilderWindowColumnEditor = observer(
|
|
1087
1085
|
spellCheck={false}
|
1088
1086
|
value={windowColumnState.columnName}
|
1089
1087
|
onChange={changeColumnName}
|
1090
|
-
|
1088
|
+
error={
|
1091
1089
|
isDuplicatedColumnName
|
1092
1090
|
? 'Duplicated column'
|
1093
1091
|
: isInvalidColumnName
|