@finos/legend-query-builder 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +11 -2
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts +23 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js +104 -0
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -0
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +1 -2
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts +0 -9
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +10 -30
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +60 -12
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +2 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +6 -14
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +12 -18
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.d.ts → QueryBuilderOLAPGroupByPanel.d.ts} +2 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.d.ts.map +1 -0
- package/lib/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.js → QueryBuilderOLAPGroupByPanel.js} +2 -2
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +9 -11
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +8 -9
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts +12 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +11 -7
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +1 -15
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +36 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js +50 -0
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -0
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +9 -11
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderHashUtils.js +2 -0
- package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
- package/lib/index.css +17 -1
- package/lib/index.css.map +1 -1
- package/lib/package.json +8 -8
- package/lib/stores/QueryBuilderConfig.d.ts +1 -0
- package/lib/stores/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConfig.js +1 -0
- package/lib/stores/QueryBuilderConfig.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +43 -0
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -0
- package/lib/stores/QueryBuilderConstantsState.js +116 -0
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -0
- package/lib/stores/QueryBuilderParametersState.d.ts +0 -4
- package/lib/stores/QueryBuilderParametersState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderParametersState.js +0 -1
- package/lib/stores/QueryBuilderParametersState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +3 -10
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +6 -140
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts +1 -2
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +7 -12
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +9 -3
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +19 -4
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +4 -3
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +50 -42
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js +32 -29
- package/lib/stores/QueryBuilderValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +14 -78
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +4 -20
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js +4 -4
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +2 -2
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts +3 -3
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js +6 -6
- package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.d.ts → QueryBuilderOLAPGroupByOperatorLoader.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.js → QueryBuilderOLAPGroupByOperatorLoader.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.d.ts → QueryBuilderOLAPGroupByState.d.ts} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.js → QueryBuilderOLAPGroupByState.js} +1 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.d.ts → QueryBuilderOLAPGroupByStateBuilder.d.ts} +3 -3
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.js → QueryBuilderOLAPGroupByStateBuilder.js} +4 -4
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.d.ts.map +1 -0
- package/lib/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.js → QueryBuilderOLAPGroupByValueSpecificationBuilder.js} +2 -2
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder.js.map +1 -0
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts +5 -5
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +10 -10
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -1
- package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +6 -4
- package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts +27 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js +93 -0
- package/lib/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js +60 -0
- package/lib/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +70 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +199 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts +49 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js +24 -0
- package/lib/stores/milestoning/QueryBuilderMilestoningImplementation.js.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.d.ts → milestoning/QueryBuilderMilestoningState.d.ts} +6 -2
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -0
- package/lib/stores/{QueryBuilderMilestoningState.js → milestoning/QueryBuilderMilestoningState.js} +20 -20
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts +26 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.d.ts.map +1 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js +55 -0
- package/lib/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.js.map +1 -0
- package/lib/stores/shared/LambdaParameterState.d.ts +14 -2
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
- package/lib/stores/shared/LambdaParameterState.js +79 -6
- package/lib/stores/shared/LambdaParameterState.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 +58 -2
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkStateBuilder.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts +2 -2
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js +7 -4
- package/lib/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +15 -15
- package/src/components/QueryBuilder.tsx +38 -0
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +284 -0
- package/src/components/QueryBuilderDiffPanel.tsx +0 -2
- package/src/components/QueryBuilderParametersPanel.tsx +24 -110
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +119 -36
- package/src/components/QueryBuilderSideBar.tsx +5 -22
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +29 -39
- package/src/components/fetch-structure/{QueryBuilderOLAPGroupByPanel_.tsx → QueryBuilderOLAPGroupByPanel.tsx} +1 -1
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +18 -19
- package/src/components/fetch-structure/QueryBuilderPostTDSPanel.tsx +1 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +9 -9
- package/src/components/filter/QueryBuilderFilterPanel.tsx +16 -17
- package/src/components/shared/BasicValueSpecificationEditor.tsx +47 -22
- package/src/components/shared/LambdaEditor.tsx +0 -15
- package/src/components/shared/QueryBuilderVariableSelector.tsx +186 -0
- package/src/components/watermark/QueryBuilderWatermark.tsx +19 -31
- package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
- package/src/stores/QueryBuilderConfig.ts +1 -0
- package/src/stores/QueryBuilderConstantsState.ts +173 -0
- package/src/stores/QueryBuilderParametersState.ts +0 -6
- package/src/stores/QueryBuilderPropertyEditorState.ts +6 -235
- package/src/stores/QueryBuilderResultState.ts +19 -17
- package/src/stores/QueryBuilderState.ts +25 -4
- package/src/stores/QueryBuilderStateBuilder.ts +111 -52
- package/src/stores/QueryBuilderValueSpecificationBuilder.ts +48 -58
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +16 -105
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +10 -29
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeStateBuilder.ts +5 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +2 -2
- package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationStateBuilder.ts +7 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByOperatorLoader_.ts → QueryBuilderOLAPGroupByOperatorLoader.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByState_.ts → QueryBuilderOLAPGroupByState.ts} +0 -0
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByStateBuilder_.ts → QueryBuilderOLAPGroupByStateBuilder.ts} +3 -1
- package/src/stores/fetch-structure/tds/olapGroupBy/{QueryBuilderOLAPGroupByValueSpecificationBuilder_.ts → QueryBuilderOLAPGroupByValueSpecificationBuilder.ts} +1 -1
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperatorHelper.ts +1 -1
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +11 -0
- package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +10 -5
- package/src/stores/milestoning/QueryBuilderBitemporalMilestoningImplementation.ts +165 -0
- package/src/stores/milestoning/QueryBuilderBusinessTemporalMilestoningImplementation.ts +96 -0
- package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +311 -0
- package/src/stores/milestoning/QueryBuilderMilestoningImplementation.ts +77 -0
- package/src/stores/{QueryBuilderMilestoningState.ts → milestoning/QueryBuilderMilestoningState.ts} +55 -39
- package/src/stores/milestoning/QueryBuilderProcessingTemporalMilestoningImplementation.ts +88 -0
- package/src/stores/shared/LambdaParameterState.ts +151 -10
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +84 -2
- package/src/stores/watermark/QueryBuilderWatermarkStateBuilder.ts +3 -0
- package/src/stores/watermark/QueryBuilderWatermarkValueSpecificationBuilder.ts +11 -5
- package/src/stores/workflows/ServiceQueryBuilderState.ts +1 -1
- package/tsconfig.json +14 -6
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.d.ts.map +0 -1
- package/lib/components/fetch-structure/QueryBuilderOLAPGroupByPanel_.js.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.d.ts.map +0 -1
- package/lib/stores/QueryBuilderMilestoningState.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByOperatorLoader_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByStateBuilder_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByState_.js.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.d.ts.map +0 -1
- package/lib/stores/fetch-structure/tds/olapGroupBy/QueryBuilderOLAPGroupByValueSpecificationBuilder_.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilder.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAyBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilder.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAyBH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAqBxE,eAAO,MAAM,mCAAmC,qCACZ,CAAC;AAgHrC,eAAO,MAAM,YAAY,WACf;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE;;CAgWjD,CAAC"}
|
@@ -35,6 +35,7 @@ import { guaranteeType } from '@finos/legend-shared';
|
|
35
35
|
import { QueryBuilderGraphFetchTreeState } from '../stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js';
|
36
36
|
import { QueryBuilderPostTDSPanel } from './fetch-structure/QueryBuilderPostTDSPanel.js';
|
37
37
|
import { QueryBuilderWatermarkEditor } from './watermark/QueryBuilderWatermark.js';
|
38
|
+
import { QueryBuilderConstantExpressionPanel } from './QueryBuilderConstantExpressionPanel.js';
|
38
39
|
export const QUERY_BUILDER_BACKDROP_CONTAINER_ID = 'query-builder.backdrop-container';
|
39
40
|
const QueryBuilderStatusBar = observer((props) => {
|
40
41
|
const { queryBuilderState } = props;
|
@@ -72,6 +73,9 @@ export const QueryBuilder = observer((props) => {
|
|
72
73
|
const toggleShowParameterPanel = () => {
|
73
74
|
queryBuilderState.setShowParametersPanel(!queryBuilderState.showParametersPanel);
|
74
75
|
};
|
76
|
+
const toggleConstantPanel = () => {
|
77
|
+
queryBuilderState.constantState.setShowConstantPanel(!queryBuilderState.constantState.showConstantPanel);
|
78
|
+
};
|
75
79
|
const toggleShowFilterPanel = () => {
|
76
80
|
queryBuilderState.filterState.setShowPanel(!queryBuilderState.filterState.showPanel);
|
77
81
|
};
|
@@ -106,7 +110,10 @@ export const QueryBuilder = observer((props) => {
|
|
106
110
|
};
|
107
111
|
return (_jsxs("div", { "data-testid": QUERY_BUILDER_TEST_ID.QUERY_BUILDER, className: "query-builder", children: [_jsx(BackdropContainer, { elementID: QUERY_BUILDER_BACKDROP_CONTAINER_ID }), _jsxs("div", { className: "query-builder__body", children: [_jsxs("div", { className: "query-builder__content", children: [_jsxs("div", { className: "query-builder__sub-header", children: [_jsxs("div", { className: "query-builder__sub-header__content__icons", children: [queryBuilderState.watermarkState.value && (_jsx(_Fragment, { children: _jsx("button", { className: "panel__header__action", onClick: openWatermark, tabIndex: -1, title: "Edit Watermark", children: _jsx(WaterDropIcon, {}) }) })), queryBuilderState.watermarkState.isEditingWatermark && (_jsx(QueryBuilderWatermarkEditor, { queryBuilderState: queryBuilderState }))] }), _jsx("div", { className: "query-builder__sub-header__content__actions", children: _jsx("div", { className: "query-builder__sub-header__actions", children: _jsxs(DropdownMenu, { className: "query-builder__sub-header__custom-action", title: "Show Advanced Menu...", content: _jsxs(MenuContent, { children: [_jsxs(MenuContentItem, { onClick: toggleShowFunctionPanel, disabled: !queryBuilderState.isQuerySupported, children: [_jsx(MenuContentItemIcon, { children: queryBuilderState.showFunctionsExplorerPanel ? (_jsx(CheckIcon, {})) : null }), _jsx(MenuContentItemLabel, { className: "query-builder__sub-header__menu-content", children: "Show Function(s)" })] }), !queryBuilderState.isParameterSupportDisabled && (_jsxs(MenuContentItem, { onClick: toggleShowParameterPanel, disabled: !queryBuilderState.isQuerySupported ||
|
108
112
|
queryBuilderState.parametersState.parameterStates
|
109
|
-
.length > 0, children: [_jsx(MenuContentItemIcon, { children: queryBuilderState.showParametersPanel ? (_jsx(CheckIcon, {})) : null }), _jsx(MenuContentItemLabel, { className: "query-builder__sub-header__menu-content", children: "Show Parameter(s)" })] })), _jsxs(MenuContentItem, { onClick:
|
113
|
+
.length > 0, children: [_jsx(MenuContentItemIcon, { children: queryBuilderState.showParametersPanel ? (_jsx(CheckIcon, {})) : null }), _jsx(MenuContentItemLabel, { className: "query-builder__sub-header__menu-content", children: "Show Parameter(s)" })] })), _jsxs(MenuContentItem, { onClick: toggleConstantPanel, disabled: !queryBuilderState.isQuerySupported ||
|
114
|
+
queryBuilderState.constantState.constants.length >
|
115
|
+
0, children: [_jsx(MenuContentItemIcon, { children: queryBuilderState.constantState
|
116
|
+
.showConstantPanel ? (_jsx(CheckIcon, {})) : null }), _jsx(MenuContentItemLabel, { className: "query-builder__sub-header__menu-content", children: "Show Constant(s)" })] }), _jsxs(MenuContentItem, { onClick: toggleShowFilterPanel, disabled: !queryBuilderState.isQuerySupported ||
|
110
117
|
Array.from(queryBuilderState.filterState.nodes.values()).length > 0, children: [_jsx(MenuContentItemIcon, { children: queryBuilderState.filterState.showPanel ? (_jsx(CheckIcon, {})) : null }), _jsx(MenuContentItemLabel, { className: "query-builder__sub-header__menu-content", children: "Show Filter" })] }), _jsxs(MenuContentItem, { onClick: toggleShowOLAPGroupByPanel, disabled: !queryBuilderState.isQuerySupported ||
|
111
118
|
!(queryBuilderState.fetchStructureState
|
112
119
|
.implementation instanceof QueryBuilderTDSState) ||
|
@@ -125,6 +132,8 @@ export const QueryBuilder = observer((props) => {
|
|
125
132
|
elevation: 7,
|
126
133
|
}, children: [_jsx("div", { className: "query-builder__sub-header__custom-action__label", children: "Advanced" }), _jsx(CaretDownIcon, { className: "query-builder__sub-header__custom-action__icon" })] }) }) })] }), _jsx("div", { className: "query-builder__main", children: _jsxs(ResizablePanelGroup, { orientation: "horizontal", children: [_jsx(ResizablePanel, { minSize: 120, children: isQuerySupported ? (_jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsx(ResizablePanel, { size: 450, minSize: 300, children: _jsx(QueryBuilderSidebar, { queryBuilderState: queryBuilderState, children: _jsxs(ResizablePanelGroup, { orientation: "horizontal", children: [_jsx(ResizablePanel, { minSize: 40, direction: 1, children: _jsx(QueryBuilderExplorerPanel, { queryBuilderState: queryBuilderState }) }), queryBuilderState.showFunctionsExplorerPanel && (_jsx(ResizablePanelSplitter, {})), queryBuilderState.showFunctionsExplorerPanel && (_jsx(ResizablePanel, { minSize: 40, direction: queryBuilderState.showParametersPanel
|
127
134
|
? [1, -1]
|
128
|
-
: -1, children: _jsx(QueryBuilderFunctionsExplorerPanel, { queryBuilderState: queryBuilderState }) })), queryBuilderState.showParametersPanel && (_jsx(ResizablePanelSplitter, {})), queryBuilderState.showParametersPanel && (_jsx(ResizablePanel, { minSize: 40, direction: -1, children: _jsx(QueryBuilderParametersPanel, { queryBuilderState: queryBuilderState }) }))
|
135
|
+
: -1, children: _jsx(QueryBuilderFunctionsExplorerPanel, { queryBuilderState: queryBuilderState }) })), queryBuilderState.showParametersPanel && (_jsx(ResizablePanelSplitter, {})), queryBuilderState.showParametersPanel && (_jsx(ResizablePanel, { minSize: 40, direction: -1, children: _jsx(QueryBuilderParametersPanel, { queryBuilderState: queryBuilderState }) })), queryBuilderState.constantState
|
136
|
+
.showConstantPanel && _jsx(ResizablePanelSplitter, {}), queryBuilderState.constantState
|
137
|
+
.showConstantPanel && (_jsx(ResizablePanel, { minSize: 40, direction: -1, children: _jsx(QueryBuilderConstantExpressionPanel, { queryBuilderState: queryBuilderState }) }))] }) }) }), _jsx(ResizablePanelSplitter, {}), _jsx(ResizablePanel, { minSize: 300, children: _jsx(QueryBuilderFetchStructurePanel, { queryBuilderState: queryBuilderState }) }), showPostFetchStructurePanel && (_jsx(ResizablePanelSplitter, {})), showPostFetchStructurePanel && (_jsx(ResizablePanel, { minSize: 300, children: renderPostFetchStructure() }))] })) : (_jsx(QueryBuilderUnsupportedQueryEditor, { queryBuilderState: queryBuilderState })) }), queryBuilderState.isResultPanelHidden ? null : (_jsx(ResizablePanelSplitter, {})), queryBuilderState.isResultPanelHidden ? null : (_jsx(ResizablePanel, { size: 300, minSize: 40, children: _jsx(QueryBuilderResultPanel, { queryBuilderState: queryBuilderState }) }))] }) })] }), queryBuilderState.textEditorState.mode && (_jsx(QueryBuilderTextEditor, { queryBuilderState: queryBuilderState }))] }), _jsx(QueryBuilderStatusBar, { queryBuilderState: queryBuilderState })] }));
|
129
138
|
});
|
130
139
|
//# sourceMappingURL=QueryBuilder.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilder.js","sourceRoot":"","sources":["../../src/components/QueryBuilder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,IAAI,EACJ,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,QAAQ,EACR,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,sDAAsD,CAAC;AACvG,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,GACZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,kDAAkD,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,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I,CAC9B,KAAC,cAAc,IAAC,OAAO,EAAE,GAAG,YACzB,wBAAwB,EAAE,GACZ,CAClB,IACmB,CACvB,CAAC,CAAC,CAAC,CACF,KAAC,kCAAkC,IACjC,iBAAiB,EAAE,iBAAiB,GACpC,CACH,GACc,EAChB,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC9C,KAAC,sBAAsB,KAAG,CAC3B,EACA,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC9C,KAAC,cAAc,IAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,YACpC,KAAC,uBAAuB,IACtB,iBAAiB,EAAE,iBAAiB,GACpC,GACa,CAClB,IACmB,GAClB,IACF,EACL,iBAAiB,CAAC,eAAe,CAAC,IAAI,IAAI,CACzC,KAAC,sBAAsB,IAAC,iBAAiB,EAAE,iBAAiB,GAAI,CACjE,IACG,EACN,KAAC,qBAAqB,IAAC,iBAAiB,EAAE,iBAAiB,GAAI,IAC3D,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
/// <reference types="react" resolution-mode="require"/>
|
17
|
+
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
18
|
+
export declare const QueryBuilderConstantExpressionPanel: ((props: {
|
19
|
+
queryBuilderState: QueryBuilderState;
|
20
|
+
}) => JSX.Element) & {
|
21
|
+
displayName: string;
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=QueryBuilderConstantExpressionPanel.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderConstantExpressionPanel.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderConstantExpressionPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA8BH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAkJxE,eAAO,MAAM,mCAAmC,WACtC;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE;;CA4FjD,CAAC"}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { buildElementOption, getPackageableElementOptionFormatter, } from '@finos/legend-application';
|
18
|
+
import { BlankPanelPlaceholder, CustomSelectorInput, Dialog, InfoCircleIcon, Modal, ModalBody, ModalFooter, ModalHeader, PanelFormSection, PanelFormTextField, PlusIcon, } from '@finos/legend-art';
|
19
|
+
import { PrimitiveType, VariableExpression, Multiplicity, } from '@finos/legend-graph';
|
20
|
+
import { generateEnumerableNameFromToken } from '@finos/legend-shared';
|
21
|
+
import { observer } from 'mobx-react-lite';
|
22
|
+
import { DEFAULT_CONSTANT_VARIABLE_NAME } from '../stores/QueryBuilderConfig.js';
|
23
|
+
import { QueryBuilderConstantExpressionState } from '../stores/QueryBuilderConstantsState.js';
|
24
|
+
import { buildDefaultInstanceValue } from '../stores/shared/ValueSpecificationEditorHelper.js';
|
25
|
+
import { variableExpression_setName } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
26
|
+
import { BasicValueSpecificationEditor } from './shared/BasicValueSpecificationEditor.js';
|
27
|
+
import { VariableViewer } from './shared/QueryBuilderVariableSelector.js';
|
28
|
+
// Note: We currently only allow constant variables for primitive types of multiplicity ONE.
|
29
|
+
// This is why we don't show multiplicity in the editor.
|
30
|
+
const QueryBuilderConstantExpressionEditor = observer((props) => {
|
31
|
+
const { constantState } = props;
|
32
|
+
const queryBuilderState = constantState.queryBuilderState;
|
33
|
+
const applicationStore = queryBuilderState.applicationStore;
|
34
|
+
const variableState = queryBuilderState.constantState;
|
35
|
+
const varExpression = constantState.variable;
|
36
|
+
const variableName = varExpression.name;
|
37
|
+
const allVariableNames = queryBuilderState.allVariableNames;
|
38
|
+
const isCreating = !variableState.constants.includes(constantState);
|
39
|
+
const valueSpec = constantState.value;
|
40
|
+
const variableType = constantState.value.genericType?.value.rawType ?? PrimitiveType.STRING;
|
41
|
+
const selectedType = buildElementOption(variableType);
|
42
|
+
const close = () => {
|
43
|
+
variableState.setSelectedConstant(undefined);
|
44
|
+
};
|
45
|
+
const changeType = (val) => {
|
46
|
+
if (variableType !== val.value) {
|
47
|
+
constantState.changeValSpecType(val.value);
|
48
|
+
}
|
49
|
+
};
|
50
|
+
const typeOptions = queryBuilderState.graphManagerState.graph.primitiveTypes
|
51
|
+
.map(buildElementOption)
|
52
|
+
.concat(queryBuilderState.graphManagerState.graph.enumerations.map(buildElementOption));
|
53
|
+
const validationMessage = !variableName
|
54
|
+
? `Constant Name can't be empty`
|
55
|
+
: allVariableNames.filter((e) => e === variableName).length >
|
56
|
+
(isCreating ? 0 : 1)
|
57
|
+
? 'Constant Name Already Exists'
|
58
|
+
: undefined;
|
59
|
+
const onAction = () => {
|
60
|
+
if (isCreating) {
|
61
|
+
variableState.addConstant(constantState);
|
62
|
+
}
|
63
|
+
close();
|
64
|
+
};
|
65
|
+
const resetConstantValue = () => {
|
66
|
+
const valSpec = buildDefaultInstanceValue(queryBuilderState.graphManagerState.graph, variableType);
|
67
|
+
constantState.setValueSpec(valSpec);
|
68
|
+
};
|
69
|
+
return (_jsx(Dialog, { open: Boolean(constantState), onClose: close, classes: {
|
70
|
+
root: 'editor-modal__root-container',
|
71
|
+
container: 'editor-modal__container',
|
72
|
+
paper: 'editor-modal__content',
|
73
|
+
}, children: _jsxs(Modal, { darkMode: true, className: "editor-modal query-builder__variables__modal", children: [_jsx(ModalHeader, { title: `${isCreating ? 'Create Constant' : 'Update Constant'}` }), _jsxs(ModalBody, { className: "query-builder__variables__modal__body", children: [_jsx(PanelFormTextField, { name: "Constant Name", prompt: "Name of constant. Should be descriptive of its purpose.", update: (value) => variableExpression_setName(varExpression, value ?? ''), value: varExpression.name, errorMessage: validationMessage, isReadOnly: false }), _jsxs(PanelFormSection, { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Type" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Data type of the parameter." }), _jsx(CustomSelectorInput, { placeholder: "Choose a type...", options: typeOptions, onChange: changeType, value: selectedType, darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled, formatOptionLabel: getPackageableElementOptionFormatter({
|
74
|
+
darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
|
75
|
+
}) })] }), _jsxs(PanelFormSection, { children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Value" }), _jsx("div", { className: "query-builder__variable-editor", children: _jsx(BasicValueSpecificationEditor, { valueSpecification: valueSpec, setValueSpecification: (val) => {
|
76
|
+
constantState.setValueSpec(val);
|
77
|
+
}, graph: queryBuilderState.graphManagerState.graph, obseverContext: queryBuilderState.observableContext, typeCheckOption: {
|
78
|
+
expectedType: variableType,
|
79
|
+
match: variableType === PrimitiveType.DATETIME,
|
80
|
+
}, resetValue: resetConstantValue }) })] })] }), _jsxs(ModalFooter, { children: [isCreating && (_jsx("button", { className: "btn modal__footer__close-btn btn--dark", onClick: onAction, disabled: Boolean(validationMessage), children: "Create" })), _jsx("button", { className: "btn modal__footer__close-btn", onClick: close, children: "Close" })] })] }) }));
|
81
|
+
});
|
82
|
+
export const QueryBuilderConstantExpressionPanel = observer((props) => {
|
83
|
+
const { queryBuilderState } = props;
|
84
|
+
const constantState = queryBuilderState.constantState;
|
85
|
+
const graph = queryBuilderState.graphManagerState.graph;
|
86
|
+
const isReadOnly = !queryBuilderState.isQuerySupported;
|
87
|
+
const varNames = queryBuilderState.allVariableNames;
|
88
|
+
const addConstant = () => {
|
89
|
+
if (!isReadOnly) {
|
90
|
+
const defaultVal = buildDefaultInstanceValue(graph, PrimitiveType.STRING);
|
91
|
+
const constantName = generateEnumerableNameFromToken(varNames, DEFAULT_CONSTANT_VARIABLE_NAME);
|
92
|
+
const variableEx = new VariableExpression(constantName, Multiplicity.ONE);
|
93
|
+
variableEx.genericType = defaultVal.genericType;
|
94
|
+
const constState = new QueryBuilderConstantExpressionState(queryBuilderState, variableEx, defaultVal);
|
95
|
+
constantState.setSelectedConstant(constState);
|
96
|
+
}
|
97
|
+
};
|
98
|
+
return (_jsxs("div", { className: "panel query-builder__variables", children: [_jsxs("div", { className: "panel__header", children: [_jsxs("div", { className: "panel__header__title", children: [_jsx("div", { className: "panel__header__title__label", children: "constants" }), _jsx("div", { className: "service-editor__pattern__parameters__header__info", title: `Constants are static values set to a variable name that can be leveraged within your query. They remain the same for ALL executions`, children: _jsx(InfoCircleIcon, {}) })] }), !isReadOnly && (_jsx("div", { className: "panel__header__actions", children: _jsx("button", { className: "panel__header__action", tabIndex: -1, onClick: addConstant, title: "Add Constant", children: _jsx(PlusIcon, {}) }) }))] }), _jsx("div", { className: "panel__content query-builder__variables__content", children: _jsxs(_Fragment, { children: [Boolean(queryBuilderState.constantState.constants) &&
|
99
|
+
queryBuilderState.constantState.constants.map((constState) => (_jsx(VariableViewer, { variable: constState.variable, constantValue: constState.value, actions: {
|
100
|
+
editVariable: () => constantState.setSelectedConstant(constState),
|
101
|
+
deleteVariable: () => constantState.removeConstant(constState),
|
102
|
+
}, isReadOnly: isReadOnly }, constState.uuid))), !constantState.constants.length && (_jsx(BlankPanelPlaceholder, { text: "Add a Constants", disabled: isReadOnly, onClick: addConstant, clickActionType: "add", previewText: "No constants", tooltipText: "Click to add a new constant" }))] }) }), constantState.selectedConstant && (_jsx(QueryBuilderConstantExpressionEditor, { constantState: constantState.selectedConstant }))] }));
|
103
|
+
});
|
104
|
+
//# sourceMappingURL=QueryBuilderConstantExpressionPanel.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"QueryBuilderConstantExpressionPanel.js","sourceRoot":"","sources":["../../src/components/QueryBuilderConstantExpressionPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,kBAAkB,EAClB,oCAAoC,GACrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,EACN,cAAc,EACd,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,GACT,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,aAAa,EACb,kBAAkB,EAClB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,EAAE,mCAAmC,EA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,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderDiffPanel.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderDiffPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;
|
1
|
+
{"version":3,"file":"QueryBuilderDiffPanel.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderDiffPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAkBH,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,+CAA+C,CAAC;AAkEvD,eAAO,MAAM,yBAAyB,WAC5B;IAAE,aAAa,EAAE,yBAAyB,CAAA;CAAE;;CAwGrD,CAAC"}
|
@@ -14,7 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
* See the License for the specific language governing permissions and
|
15
15
|
* limitations under the License.
|
16
16
|
*/
|
17
|
-
import {
|
17
|
+
import { EDITOR_LANGUAGE, EDITOR_THEME, TAB_SIZE, useApplicationStore, } from '@finos/legend-application';
|
18
18
|
import { getBaseTextEditorOptions, clsx, Dialog, disposeDiffEditor, useResizeDetector, } from '@finos/legend-art';
|
19
19
|
import { observer } from 'mobx-react-lite';
|
20
20
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
@@ -45,7 +45,6 @@ const TextDiffView = observer((props) => {
|
|
45
45
|
readOnly: true,
|
46
46
|
wordWrap: 'on',
|
47
47
|
});
|
48
|
-
_editor.getOriginalEditor().onKeyDown(createPassThroughOnKeyHandler());
|
49
48
|
setEditor(_editor);
|
50
49
|
}
|
51
50
|
}, [applicationStore, editor]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderDiffPanel.js","sourceRoot":"","sources":["../../src/components/QueryBuilderDiffPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,
|
1
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reference types="react" resolution-mode="require"/>
|
17
17
|
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
18
|
-
import { LambdaParameterState } from '../stores/shared/LambdaParameterState.js';
|
19
|
-
export declare const VariableExpressionViewer: ((props: {
|
20
|
-
queryBuilderState: QueryBuilderState;
|
21
|
-
isReadOnly: boolean;
|
22
|
-
hideActions?: boolean;
|
23
|
-
variableExpressionState: LambdaParameterState;
|
24
|
-
}) => JSX.Element) & {
|
25
|
-
displayName: string;
|
26
|
-
};
|
27
18
|
export declare const QueryBuilderParametersPanel: ((props: {
|
28
19
|
queryBuilderState: QueryBuilderState;
|
29
20
|
}) => JSX.Element) & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderParametersPanel.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderParametersPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderParametersPanel.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderParametersPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAwMxE,eAAO,MAAM,2BAA2B,WAC9B;IAAE,iBAAiB,EAAE,iBAAiB,CAAA;CAAE;;CAmGjD,CAAC"}
|
@@ -15,16 +15,15 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
15
15
|
* limitations under the License.
|
16
16
|
*/
|
17
17
|
import { observer } from 'mobx-react-lite';
|
18
|
-
import { Dialog, BlankPanelContent, CustomSelectorInput,
|
19
|
-
import { QUERY_BUILDER_PARAMETER_DND_TYPE, } from '../stores/QueryBuilderParametersState.js';
|
18
|
+
import { Dialog, BlankPanelContent, CustomSelectorInput, PlusIcon, BlankPanelPlaceholder, Modal, ModalBody, ModalFooter, ModalHeader, PanelFormTextField, InfoCircleIcon, } from '@finos/legend-art';
|
20
19
|
import { VariableExpression, GenericTypeExplicitReference, GenericType, PrimitiveType, Multiplicity, getMultiplicityPrettyDescription, } from '@finos/legend-graph';
|
21
20
|
import { buildElementOption, getPackageableElementOptionFormatter, useApplicationStore, } from '@finos/legend-application';
|
22
|
-
import { useDrag } from 'react-dnd';
|
23
21
|
import { generateEnumerableNameFromToken } from '@finos/legend-shared';
|
24
22
|
import { DEFAULT_VARIABLE_NAME } from '../stores/QueryBuilderConfig.js';
|
25
|
-
import {
|
23
|
+
import { variableExpression_setName } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
26
24
|
import { LambdaParameterState } from '../stores/shared/LambdaParameterState.js';
|
27
25
|
import { LambdaParameterValuesEditor } from './shared/LambdaParameterValuesEditor.js';
|
26
|
+
import { VariableViewer } from './shared/QueryBuilderVariableSelector.js';
|
28
27
|
const buildMultiplicityOption = (multiplicity) => ({
|
29
28
|
label: getMultiplicityPrettyDescription(multiplicity),
|
30
29
|
value: multiplicity,
|
@@ -65,9 +64,7 @@ const VariableExpressionEditor = observer((props) => {
|
|
65
64
|
];
|
66
65
|
const multilicityOptions = validParamMultiplicityList.map(buildMultiplicityOption);
|
67
66
|
const changeMultiplicity = (val) => {
|
68
|
-
|
69
|
-
valueSpecification_setMultiplicity(varState, val.value);
|
70
|
-
}
|
67
|
+
lambdaParameterState.changeMultiplicity(varState, val.value);
|
71
68
|
};
|
72
69
|
const close = () => {
|
73
70
|
queryParametersState.setSelectedParameter(undefined);
|
@@ -82,30 +79,10 @@ const VariableExpressionEditor = observer((props) => {
|
|
82
79
|
root: 'editor-modal__root-container',
|
83
80
|
container: 'editor-modal__container',
|
84
81
|
paper: 'editor-modal__content',
|
85
|
-
}, children: _jsxs(Modal, { darkMode: true, className: "editor-modal query-
|
82
|
+
}, children: _jsxs(Modal, { darkMode: true, className: "editor-modal query-builder__variables__modal", children: [_jsx(ModalHeader, { title: `${isCreating ? 'Create Parameter' : 'Update Parameter'}` }), _jsxs(ModalBody, { className: "query-builder__variables__modal__body", children: [_jsx(PanelFormTextField, { name: "Parameter Name", prompt: "Name of the parameter. Should be descriptive of its purpose.", update: (value) => variableExpression_setName(varState, value ?? ''), value: varState.name, errorMessage: validationMessage, isReadOnly: false }), _jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Type" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Data type of the parameter." }), _jsx(CustomSelectorInput, { placeholder: "Choose a type...", options: typeOptions, onChange: changeType, value: selectedType, darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled, formatOptionLabel: getPackageableElementOptionFormatter({
|
86
83
|
darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled,
|
87
84
|
}) })] }), _jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Multiplicity" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "The multiplity determines how many values a parameter can have. Default is set to mandatory single vlue." }), _jsx(CustomSelectorInput, { placeholder: "Choose a multiplicity...", options: multilicityOptions, onChange: changeMultiplicity, value: selectedMultiplicity, hasError: !validParamMultiplicityList.includes(selectedMultiplicity.value), darkMode: !applicationStore.TEMPORARY__isLightThemeEnabled })] })] }), _jsxs(ModalFooter, { children: [isCreating && (_jsx("button", { className: "btn modal__footer__close-btn btn--dark", onClick: onAction, disabled: Boolean(validationMessage), children: "Create" })), _jsx("button", { className: "btn modal__footer__close-btn", onClick: close, children: "Close" })] })] }) }));
|
88
85
|
});
|
89
|
-
export const VariableExpressionViewer = observer((props) => {
|
90
|
-
const { queryBuilderState, isReadOnly, hideActions, variableExpressionState, } = props;
|
91
|
-
const queryParameterState = queryBuilderState.parametersState;
|
92
|
-
const variable = variableExpressionState.parameter;
|
93
|
-
const name = variable.name;
|
94
|
-
const variableType = variable.genericType?.value.rawType;
|
95
|
-
const typeName = variableType?.name;
|
96
|
-
const editVariable = () => {
|
97
|
-
queryParameterState.setSelectedParameter(variableExpressionState);
|
98
|
-
};
|
99
|
-
const deleteVariable = () => queryParameterState.removeParameter(variableExpressionState);
|
100
|
-
const [, dragConnector, dragPreviewConnector] = useDrag(() => ({
|
101
|
-
type: QUERY_BUILDER_PARAMETER_DND_TYPE,
|
102
|
-
item: { variable: variableExpressionState },
|
103
|
-
}), [variableExpressionState]);
|
104
|
-
useDragPreviewLayer(dragPreviewConnector);
|
105
|
-
return (_jsxs("div", { className: "query-builder__parameters__parameter", ref: dragConnector, children: [_jsx(DragPreviewLayer, { labelGetter: (item) => item.variable.variableName === ''
|
106
|
-
? '(unknown)'
|
107
|
-
: item.variable.variableName, types: [QUERY_BUILDER_PARAMETER_DND_TYPE] }), _jsxs("div", { className: "query-builder__parameters__parameter__content", children: [_jsx("div", { className: "query-builder__parameters__parameter__icon", children: _jsx("div", { className: "query-builder__parameters__parameter-icon", children: _jsx(DollarIcon, {}) }) }), _jsxs("div", { className: "query-builder__parameters__parameter__label", children: [name, _jsx("div", { className: "query-builder__parameters__parameter__type", children: _jsx("div", { className: "query-builder__parameters__parameter__type__label", children: typeName }) })] })] }), !hideActions && (_jsxs("div", { className: "query-builder__parameters__parameter__actions", children: [_jsx("button", { className: "query-builder__parameters__parameter__action", tabIndex: -1, disabled: isReadOnly, onClick: editVariable, title: "Edit", children: _jsx(PencilIcon, {}) }), _jsx("button", { className: "query-builder__parameters__parameter__action", tabIndex: -1, onClick: deleteVariable, disabled: isReadOnly, title: "Remove", children: _jsx(TimesIcon, {}) })] }))] }));
|
108
|
-
});
|
109
86
|
export const QueryBuilderParametersPanel = observer((props) => {
|
110
87
|
const { queryBuilderState } = props;
|
111
88
|
const isReadOnly = !queryBuilderState.isQuerySupported;
|
@@ -118,7 +95,10 @@ export const QueryBuilderParametersPanel = observer((props) => {
|
|
118
95
|
parmaterState.mockParameterValue();
|
119
96
|
}
|
120
97
|
};
|
121
|
-
return (_jsxs("div", { className: "panel query-
|
122
|
-
queryParameterState.parameterStates.map((
|
98
|
+
return (_jsxs("div", { className: "panel query-builder__variables", children: [_jsxs("div", { className: "panel__header", children: [_jsxs("div", { className: "panel__header__title", children: [_jsx("div", { className: "panel__header__title__label", children: "parameters" }), _jsx("div", { className: "service-editor__pattern__parameters__header__info", title: `Parameters are variables assigned to your query. They are dynamic in nature and can change for each execution.`, children: _jsx(InfoCircleIcon, {}) })] }), !isReadOnly && !queryBuilderState.isParameterSupportDisabled && (_jsx("div", { className: "panel__header__actions", children: _jsx("button", { className: "panel__header__action", tabIndex: -1, onClick: addParameter, title: "Add Parameter", children: _jsx(PlusIcon, {}) }) }))] }), _jsxs("div", { className: "panel__content query-builder__variables__content", children: [!queryBuilderState.isParameterSupportDisabled && (_jsxs(_Fragment, { children: [Boolean(queryParameterState.parameterStates.length) &&
|
99
|
+
queryParameterState.parameterStates.map((pState) => (_jsx(VariableViewer, { variable: pState.parameter, isReadOnly: isReadOnly, actions: {
|
100
|
+
editVariable: () => queryParameterState.setSelectedParameter(pState),
|
101
|
+
deleteVariable: () => queryParameterState.removeParameter(pState),
|
102
|
+
} }, pState.uuid))), !queryParameterState.parameterStates.length && (_jsx(BlankPanelPlaceholder, { text: "Add a parameter", disabled: isReadOnly, onClick: addParameter, clickActionType: "add", previewText: "No parameter", tooltipText: "Click to add a new parameter" }))] })), queryBuilderState.isParameterSupportDisabled && (_jsx(BlankPanelContent, { children: "Parameters are not supported" }))] }), queryParameterState.selectedParameter && (_jsx(VariableExpressionEditor, { queryBuilderState: queryBuilderState, lambdaParameterState: queryParameterState.selectedParameter })), queryParameterState.parameterValuesEditorState.showModal && (_jsx(LambdaParameterValuesEditor, { graph: queryBuilderState.graphManagerState.graph, observerContext: queryBuilderState.observableContext, lambdaParametersState: queryParameterState }))] }));
|
123
103
|
});
|
124
104
|
//# sourceMappingURL=QueryBuilderParametersPanel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderParametersPanel.js","sourceRoot":"","sources":["../../src/components/QueryBuilderParametersPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,mBAAmB,EACnB,
|
1
|
+
{"version":3,"file":"QueryBuilderParametersPanel.js","sourceRoot":"","sources":["../../src/components/QueryBuilderParametersPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACrB,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,kBAAkB,EAClB,4BAA4B,EAC5B,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gCAAgC,GACjC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,kBAAkB,EAClB,oCAAoC,EACpC,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sDAAsD,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAI1E,MAAM,uBAAuB,GAAG,CAC9B,YAA0B,EACN,EAAE,CAAC,CAAC;IACxB,KAAK,EAAE,gCAAgC,CAAC,YAAY,CAAC;IACrD,KAAK,EAAE,YAAY;CACpB,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG,Q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CACxC,KAAC,wBAAwB,IACvB,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,mBAAmB,CAAC,iBAAiB,GAC3D,CACH,EACA,mBAAmB,CAAC,0BAA0B,CAAC,SAAS,IAAI,CAC3D,KAAC,2BAA2B,IAC1B,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,EAChD,eAAe,EAAE,iBAAiB,CAAC,iBAAiB,EACpD,qBAAqB,EAAE,mBAAmB,GAC1C,CACH,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderPropertyExpressionEditor.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderPropertyExpressionEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAeH,OAAO,
|
1
|
+
{"version":3,"file":"QueryBuilderPropertyExpressionEditor.d.ts","sourceRoot":"","sources":["../../src/components/QueryBuilderPropertyExpressionEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAeH,OAAO,EAIL,KAAK,mCAAmC,EACzC,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAGL,KAAK,wCAAwC,EAC9C,MAAM,iDAAiD,CAAC;AAqQzD,eAAO,MAAM,oCAAoC,WACvC;IAAE,uBAAuB,EAAE,mCAAmC,CAAA;CAAE;;CAiDzE,CAAC;AAEF,eAAO,MAAM,mCAAmC;6BAEnB,mCAAmC;uCAEpD,wCAAwC,KAC3C,IAAI;;;CAyGZ,CAAC"}
|
@@ -17,27 +17,28 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useCallback } from 'react';
|
18
18
|
import { clsx, Dialog, PanelDropZone, InfoCircleIcon, PanelEntryDropZonePlaceholder, Modal, ModalHeader, ModalBody, ModalFooter, } from '@finos/legend-art';
|
19
19
|
import { observer } from 'mobx-react-lite';
|
20
|
-
import {
|
20
|
+
import { generateValueSpecificationForParameter, getPropertyPath, } from '../stores/QueryBuilderPropertyEditorState.js';
|
21
21
|
import { useDrop } from 'react-dnd';
|
22
22
|
import { QUERY_BUILDER_EXPLORER_TREE_DND_TYPE, } from '../stores/explorer/QueryBuilderExplorerState.js';
|
23
23
|
import { QueryBuilderPropertyInfoTooltip } from './shared/QueryBuilderPropertyInfoTooltip.js';
|
24
|
-
import {
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import { guaranteeNonNullable } from '@finos/legend-shared';
|
28
|
-
import { BasicValueSpecificationEditor } from './shared/BasicValueSpecificationEditor.js';
|
24
|
+
import { Class, Enumeration, PrimitiveType, isSuperType, AbstractPropertyExpression, INTERNAL__PropagatedValue, getMilestoneTemporalStereotype, } from '@finos/legend-graph';
|
25
|
+
import { guaranteeNonNullable, guaranteeType } from '@finos/legend-shared';
|
26
|
+
import { BasicValueSpecificationEditor, QUERY_BUILDER_VARIABLE_DND_TYPE, } from './shared/BasicValueSpecificationEditor.js';
|
29
27
|
import { functionExpression_setParameterValue } from '../stores/shared/ValueSpecificationModifierHelper.js';
|
28
|
+
import { ActionAlertActionType, ActionAlertType, } from '@finos/legend-application';
|
29
|
+
import { VariableSelector } from './shared/QueryBuilderVariableSelector.js';
|
30
|
+
import { generateMilestonedPropertyParameterValue, isDefaultDatePropagationSupported, matchMilestoningParameterValue, } from '../stores/milestoning/QueryBuilderMilestoningHelper.js';
|
30
31
|
const DerivedPropertyParameterValueEditor = observer((props) => {
|
31
32
|
const { derivedPropertyExpressionState, variable, idx } = props;
|
32
33
|
const graph = derivedPropertyExpressionState.queryBuilderState.graphManagerState.graph;
|
33
34
|
const parameterType = guaranteeNonNullable(derivedPropertyExpressionState.parameters[idx]?.genericType).value.rawType;
|
34
35
|
const handleDrop = useCallback((item) => {
|
35
|
-
functionExpression_setParameterValue(derivedPropertyExpressionState.propertyExpression, item.variable
|
36
|
+
functionExpression_setParameterValue(derivedPropertyExpressionState.propertyExpression, item.variable, idx + 1, derivedPropertyExpressionState.queryBuilderState.observableContext);
|
36
37
|
}, [derivedPropertyExpressionState, idx]);
|
37
38
|
const [{ isParameterValueDragOver }, dropTargetConnector] = useDrop(() => ({
|
38
|
-
accept: [
|
39
|
+
accept: [QUERY_BUILDER_VARIABLE_DND_TYPE],
|
39
40
|
drop: (item, monitor) => {
|
40
|
-
const itemType = item.variable.
|
41
|
+
const itemType = item.variable.genericType?.value.rawType;
|
41
42
|
if (!monitor.didDrop() &&
|
42
43
|
// Doing a type check, which only allows dragging and dropping parameters of the same type or of child types
|
43
44
|
itemType &&
|
@@ -52,19 +53,66 @@ const DerivedPropertyParameterValueEditor = observer((props) => {
|
|
52
53
|
}),
|
53
54
|
}),
|
54
55
|
}), [handleDrop]);
|
56
|
+
const queryBuilderState = derivedPropertyExpressionState.queryBuilderState;
|
57
|
+
// Resets the next property expression in the property chain for milestoned properties when the user changes
|
58
|
+
// the milestoned dates of current property expression and it propagates those dates to next property expression.
|
59
|
+
const resetNextExpression = (nextExpression) => {
|
60
|
+
const milestoningStereotype = getMilestoneTemporalStereotype(guaranteeType(nextExpression.func.value.genericType.value.rawType, Class), queryBuilderState.graphManagerState.graph);
|
61
|
+
nextExpression.parametersValues.slice(1).forEach((parameter, index) => {
|
62
|
+
if (milestoningStereotype &&
|
63
|
+
parameter instanceof INTERNAL__PropagatedValue &&
|
64
|
+
!matchMilestoningParameterValue(milestoningStereotype, index, parameter.getValue(), queryBuilderState.milestoningState)) {
|
65
|
+
const newParameterValue = new INTERNAL__PropagatedValue(() => guaranteeNonNullable(queryBuilderState.milestoningState
|
66
|
+
.getMilestoningImplementation(milestoningStereotype)
|
67
|
+
.getMilestoningDate(index)));
|
68
|
+
newParameterValue.isPropagatedValue = false;
|
69
|
+
functionExpression_setParameterValue(guaranteeType(nextExpression, AbstractPropertyExpression), guaranteeNonNullable(newParameterValue), index + 1, queryBuilderState.observableContext);
|
70
|
+
}
|
71
|
+
});
|
72
|
+
};
|
73
|
+
const checkDatePropagation = (nextExpression) => {
|
74
|
+
if (nextExpression instanceof AbstractPropertyExpression &&
|
75
|
+
isDefaultDatePropagationSupported(nextExpression, queryBuilderState) &&
|
76
|
+
nextExpression.func.value.genericType.value.rawType instanceof Class) {
|
77
|
+
queryBuilderState.applicationStore.setActionAlertInfo({
|
78
|
+
message: 'You have just changed a milestoning date in the property expression chain, this date will be propagated down the rest of the chain. Do you want to proceed? Otherwise, you can choose to propagate the default milestoning dates instead.',
|
79
|
+
type: ActionAlertType.CAUTION,
|
80
|
+
actions: [
|
81
|
+
{
|
82
|
+
label: 'Proceed',
|
83
|
+
type: ActionAlertActionType.PROCEED_WITH_CAUTION,
|
84
|
+
default: true,
|
85
|
+
},
|
86
|
+
{
|
87
|
+
label: 'Propagate default milestoning date(s)',
|
88
|
+
type: ActionAlertActionType.PROCEED,
|
89
|
+
handler: queryBuilderState.applicationStore.guardUnhandledError(async () => resetNextExpression(nextExpression)),
|
90
|
+
},
|
91
|
+
],
|
92
|
+
});
|
93
|
+
}
|
94
|
+
};
|
55
95
|
const resetParameterValue = () => {
|
56
96
|
functionExpression_setParameterValue(derivedPropertyExpressionState.propertyExpression, generateMilestonedPropertyParameterValue(derivedPropertyExpressionState, idx) ??
|
57
97
|
generateValueSpecificationForParameter(variable, derivedPropertyExpressionState.queryBuilderState.graphManagerState
|
58
98
|
.graph), idx + 1, derivedPropertyExpressionState.queryBuilderState.observableContext);
|
99
|
+
const derivedPropertyExpressionStates = derivedPropertyExpressionState.propertyExpressionState
|
100
|
+
.derivedPropertyExpressionStates;
|
101
|
+
const currentDerivedPropertyStateindex = derivedPropertyExpressionStates.indexOf(derivedPropertyExpressionState);
|
102
|
+
checkDatePropagation(currentDerivedPropertyStateindex + 1 <
|
103
|
+
derivedPropertyExpressionStates.length
|
104
|
+
? derivedPropertyExpressionStates[currentDerivedPropertyStateindex + 1]?.propertyExpression
|
105
|
+
: undefined);
|
59
106
|
};
|
60
|
-
|
107
|
+
const valueSpec = guaranteeNonNullable(derivedPropertyExpressionState.parameterValues[idx]);
|
108
|
+
return (_jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: variable.name }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: `${variable.multiplicity.lowerBound === 0 ? 'optional' : ''}` }), _jsx("div", { className: "query-builder__variable-editor", children: _jsx(PanelDropZone, { isDragOver: isParameterValueDragOver, dropTargetConnector: dropTargetConnector, children: _jsx(BasicValueSpecificationEditor, { valueSpecification: valueSpec, setValueSpecification: (val) => {
|
61
109
|
functionExpression_setParameterValue(derivedPropertyExpressionState.propertyExpression, val, idx + 1, derivedPropertyExpressionState.queryBuilderState
|
62
110
|
.observableContext);
|
63
111
|
}, graph: graph, obseverContext: derivedPropertyExpressionState.queryBuilderState
|
64
112
|
.observableContext, typeCheckOption: {
|
65
113
|
expectedType: parameterType,
|
66
114
|
match: parameterType === PrimitiveType.DATETIME,
|
67
|
-
}, resetValue: resetParameterValue }) }) }), _jsx("div", { className: "panel__content__form__section__list" })] }, variable.name));
|
115
|
+
}, resetValue: resetParameterValue, isConstant: queryBuilderState.constantState.isValueSpecConstant(valueSpec) }) }) }), _jsx("div", { className: "panel__content__form__section__list" })] }, variable.name));
|
68
116
|
});
|
69
117
|
const DerivedPropertyExpressionEditor = observer((props) => {
|
70
118
|
const { derivedPropertyExpressionState } = props;
|
@@ -79,7 +127,7 @@ export const QueryBuilderPropertyExpressionEditor = observer((props) => {
|
|
79
127
|
root: 'editor-modal__root-container',
|
80
128
|
container: 'editor-modal__container',
|
81
129
|
paper: 'editor-modal__content',
|
82
|
-
}, children: _jsxs(Modal, { darkMode: true, className: "editor-modal query-builder-property-editor", children: [_jsx(ModalHeader, { title: "Derived Property" }), _jsxs(ModalBody, { className: "query-builder-property-editor__content", children: [propertyExpressionState.derivedPropertyExpressionStates.map((pe) => (_jsx(DerivedPropertyExpressionEditor, { derivedPropertyExpressionState: pe }, pe.path))),
|
130
|
+
}, children: _jsxs(Modal, { darkMode: true, className: "editor-modal query-builder-property-editor", children: [_jsx(ModalHeader, { title: "Derived Property" }), _jsxs(ModalBody, { className: "query-builder-property-editor__content", children: [propertyExpressionState.derivedPropertyExpressionStates.map((pe) => (_jsx(DerivedPropertyExpressionEditor, { derivedPropertyExpressionState: pe }, pe.path))), _jsx(ModalBody, { className: "query-builder__variables__modal__body", children: _jsx(VariableSelector, { queryBuilderState: propertyExpressionState.queryBuilderState }) })] }), _jsx(ModalFooter, { children: _jsx("button", { className: "btn modal__footer__close-btn", onClick: handleClose, children: "Done" }) })] }) }));
|
83
131
|
});
|
84
132
|
export const QueryBuilderPropertyExpressionBadge = observer((props) => {
|
85
133
|
const { propertyExpressionState, onPropertyExpressionChange } = props;
|