@finos/legend-query-builder 4.14.96 → 4.15.1
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 +2 -1
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +4 -4
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +2 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/data-cube/QueryBuilderDataCube.d.ts +22 -0
- package/lib/components/data-cube/QueryBuilderDataCube.d.ts.map +1 -0
- package/lib/components/data-cube/QueryBuilderDataCube.js +48 -0
- package/lib/components/data-cube/QueryBuilderDataCube.js.map +1 -0
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +2 -2
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.js +6 -3
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +6 -7
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSResultShared.d.ts +2 -2
- package/lib/components/result/tds/QueryBuilderTDSResultShared.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js +19 -155
- package/lib/components/result/tds/QueryBuilderTDSResultShared.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +5 -5
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +2 -2
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +3 -3
- package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/MappingQueryBuilder.js +3 -3
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.d.ts +5 -1
- package/lib/graph-manager/QueryBuilderConfig.d.ts.map +1 -1
- package/lib/graph-manager/QueryBuilderConfig.js +6 -1
- package/lib/graph-manager/QueryBuilderConfig.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +8 -7
- package/lib/stores/QueryBuilderState.d.ts +2 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +9 -19
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/data-cube/QueryBuilderDataCubeApplicationEngine.d.ts +38 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeApplicationEngine.d.ts.map +1 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeApplicationEngine.js +71 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeApplicationEngine.js.map +1 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngine.d.ts +52 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngine.d.ts.map +1 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngine.js +149 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngine.js.map +1 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngineHelper.d.ts +19 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngineHelper.d.ts.map +1 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngineHelper.js +31 -0
- package/lib/stores/data-cube/QueryBuilderDataCubeEngineHelper.js.map +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +1 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +1 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +3 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +1 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +3 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +1 -1
- package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +3 -8
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +2 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +3 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
- package/package.json +17 -16
- package/src/components/QueryBuilder.tsx +4 -0
- package/src/components/QueryBuilderSideBar.tsx +11 -10
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +8 -2
- package/src/components/data-cube/QueryBuilderDataCube.tsx +116 -0
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +1 -1
- package/src/components/filter/QueryBuilderFilterPanel.tsx +2 -2
- package/src/components/result/QueryBuilderResultPanel.tsx +24 -0
- package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +13 -9
- package/src/components/result/tds/QueryBuilderTDSResultShared.tsx +26 -332
- package/src/components/shared/BasicValueSpecificationEditor.tsx +21 -15
- package/src/components/shared/CustomDatePicker.tsx +10 -17
- package/src/components/workflows/ClassQueryBuilder.tsx +6 -5
- package/src/components/workflows/MappingQueryBuilder.tsx +6 -5
- package/src/graph-manager/QueryBuilderConfig.ts +7 -1
- package/src/index.ts +2 -0
- package/src/stores/QueryBuilderState.ts +13 -27
- package/src/stores/data-cube/QueryBuilderDataCubeApplicationEngine.ts +109 -0
- package/src/stores/data-cube/QueryBuilderDataCubeEngine.ts +255 -0
- package/src/stores/data-cube/QueryBuilderDataCubeEngineHelper.ts +41 -0
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +1 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +4 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +4 -0
- package/src/stores/filter/QueryBuilderFilterOperator.ts +1 -1
- package/src/stores/filter/QueryBuilderFilterState.ts +5 -10
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +1 -1
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -3
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -3
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +2 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +4 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +4 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +2 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +2 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +4 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +4 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -3
- package/tsconfig.json +4 -0
@@ -0,0 +1,116 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import { DataCube, DataCubeProvider } from '@finos/legend-data-cube';
|
18
|
+
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
19
|
+
import { observer } from 'mobx-react-lite';
|
20
|
+
import { QueryBuilderDataCubeApplicationEngine } from '../../stores/data-cube/QueryBuilderDataCubeApplicationEngine.js';
|
21
|
+
import {
|
22
|
+
clsx,
|
23
|
+
Dialog,
|
24
|
+
EmptyWindowRestoreIcon,
|
25
|
+
Modal,
|
26
|
+
TimesIcon,
|
27
|
+
WindowMaximizeIcon,
|
28
|
+
} from '@finos/legend-art';
|
29
|
+
import { useState } from 'react';
|
30
|
+
import { RuntimePointer } from '@finos/legend-graph';
|
31
|
+
import { QueryBuilderDataCubeEngine } from '../../stores/data-cube/QueryBuilderDataCubeEngine.js';
|
32
|
+
|
33
|
+
const QueryBuilderDataCube = observer(
|
34
|
+
(props: { queryBuilderState: QueryBuilderState }) => {
|
35
|
+
const { queryBuilderState } = props;
|
36
|
+
const applicationStore = new QueryBuilderDataCubeApplicationEngine(
|
37
|
+
queryBuilderState.applicationStore,
|
38
|
+
);
|
39
|
+
const runtime =
|
40
|
+
queryBuilderState.executionContextState.runtimeValue instanceof
|
41
|
+
RuntimePointer
|
42
|
+
? queryBuilderState.executionContextState.runtimeValue
|
43
|
+
.packageableRuntime.value.path
|
44
|
+
: undefined;
|
45
|
+
if (!runtime) {
|
46
|
+
// TODO: add better message
|
47
|
+
return null;
|
48
|
+
}
|
49
|
+
const queryBuilderEngine = new QueryBuilderDataCubeEngine(
|
50
|
+
queryBuilderState.buildQuery(),
|
51
|
+
queryBuilderState.executionContextState.mapping?.path,
|
52
|
+
runtime,
|
53
|
+
queryBuilderState.graphManagerState,
|
54
|
+
);
|
55
|
+
|
56
|
+
return (
|
57
|
+
<DataCubeProvider
|
58
|
+
application={applicationStore}
|
59
|
+
engine={queryBuilderEngine}
|
60
|
+
>
|
61
|
+
<DataCube />
|
62
|
+
</DataCubeProvider>
|
63
|
+
);
|
64
|
+
},
|
65
|
+
);
|
66
|
+
|
67
|
+
export const QueryBuilderDataCubeDialog = observer(
|
68
|
+
(props: { queryBuilderState: QueryBuilderState }) => {
|
69
|
+
const { queryBuilderState } = props;
|
70
|
+
const [isMaximized, setIsMaximized] = useState(false);
|
71
|
+
const toggleMaximize = (): void => setIsMaximized(!isMaximized);
|
72
|
+
const closeModal = () => queryBuilderState.setIsCubeEnabled(false);
|
73
|
+
return (
|
74
|
+
<Dialog
|
75
|
+
open={true}
|
76
|
+
onClose={closeModal}
|
77
|
+
classes={{ container: 'dataspace-info-modal__container' }}
|
78
|
+
>
|
79
|
+
<Modal
|
80
|
+
darkMode={false}
|
81
|
+
className={clsx('editor-modal query-builder__dialog', {
|
82
|
+
'query-builder__dialog--expanded': isMaximized,
|
83
|
+
})}
|
84
|
+
>
|
85
|
+
<div className="query-builder__dialog__header">
|
86
|
+
<div className="query-builder__dialog__header__actions">
|
87
|
+
<button
|
88
|
+
className="query-builder__dialog__header__action"
|
89
|
+
tabIndex={-1}
|
90
|
+
onClick={toggleMaximize}
|
91
|
+
title={isMaximized ? 'Minimize' : 'Maximize'}
|
92
|
+
>
|
93
|
+
{isMaximized ? (
|
94
|
+
<EmptyWindowRestoreIcon />
|
95
|
+
) : (
|
96
|
+
<WindowMaximizeIcon />
|
97
|
+
)}
|
98
|
+
</button>
|
99
|
+
<button
|
100
|
+
className="query-builder__dialog__header__action"
|
101
|
+
tabIndex={-1}
|
102
|
+
onClick={closeModal}
|
103
|
+
title="Close"
|
104
|
+
>
|
105
|
+
<TimesIcon />
|
106
|
+
</button>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
<div className="query-builder__dialog__content">
|
110
|
+
<QueryBuilderDataCube queryBuilderState={queryBuilderState} />
|
111
|
+
</div>
|
112
|
+
</Modal>
|
113
|
+
</Dialog>
|
114
|
+
);
|
115
|
+
},
|
116
|
+
);
|
@@ -1110,7 +1110,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
1110
1110
|
className="query-builder-filter-tree__condition-node__operator__dropdown__option"
|
1111
1111
|
onClick={changeOperator(op)}
|
1112
1112
|
>
|
1113
|
-
{op.getLabel()}
|
1113
|
+
{op.getLabel(node.condition)}
|
1114
1114
|
</MenuContentItem>
|
1115
1115
|
))}
|
1116
1116
|
</MenuContent>
|
@@ -1122,7 +1122,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
1122
1122
|
}}
|
1123
1123
|
>
|
1124
1124
|
<div className="query-builder-filter-tree__condition-node__operator__label">
|
1125
|
-
{node.condition.operator.getLabel()}
|
1125
|
+
{node.condition.operator.getLabel(node.condition)}
|
1126
1126
|
</div>
|
1127
1127
|
<div className="query-builder-filter-tree__condition-node__operator__dropdown__trigger">
|
1128
1128
|
<CaretDownIcon />
|
@@ -46,6 +46,7 @@ import {
|
|
46
46
|
CubesLoadingIndicator,
|
47
47
|
InfoCircleIcon,
|
48
48
|
ShareBoxIcon,
|
49
|
+
CubeIcon,
|
49
50
|
} from '@finos/legend-art';
|
50
51
|
import { observer } from 'mobx-react-lite';
|
51
52
|
import { flowResult } from 'mobx';
|
@@ -56,6 +57,7 @@ import {
|
|
56
57
|
TDSExecutionResult,
|
57
58
|
RawExecutionResult,
|
58
59
|
ExecutionError,
|
60
|
+
RuntimePointer,
|
59
61
|
} from '@finos/legend-graph';
|
60
62
|
import {
|
61
63
|
ActionAlertActionType,
|
@@ -837,6 +839,28 @@ export const QueryBuilderResultPanel = observer(
|
|
837
839
|
</MenuContentItemIcon>
|
838
840
|
<MenuContentItemLabel>Others...</MenuContentItemLabel>
|
839
841
|
</MenuContentItem>
|
842
|
+
{queryBuilderState.config?.TEMPORARY__enableExportToCube && (
|
843
|
+
<MenuContentItem
|
844
|
+
onClick={(): void =>
|
845
|
+
queryBuilderState.setIsCubeEnabled(true)
|
846
|
+
}
|
847
|
+
disabled={
|
848
|
+
!queryBuilderState.fetchStructureState.implementation
|
849
|
+
.canBeExportedToCube ||
|
850
|
+
!(
|
851
|
+
queryBuilderState.executionContextState
|
852
|
+
.runtimeValue instanceof RuntimePointer
|
853
|
+
)
|
854
|
+
}
|
855
|
+
>
|
856
|
+
<MenuContentItemIcon>
|
857
|
+
<CubeIcon />
|
858
|
+
</MenuContentItemIcon>
|
859
|
+
<MenuContentItemLabel>
|
860
|
+
Data Cube (BETA)
|
861
|
+
</MenuContentItemLabel>
|
862
|
+
</MenuContentItem>
|
863
|
+
)}
|
840
864
|
{extraExportMenuContentItems}
|
841
865
|
</MenuContent>
|
842
866
|
}
|
@@ -44,6 +44,7 @@ import { QueryBuilderTDSState } from '../../../stores/fetch-structure/tds/QueryB
|
|
44
44
|
import { DEFAULT_LOCALE } from '../../../graph-manager/QueryBuilderConst.js';
|
45
45
|
import {
|
46
46
|
assertErrorThrown,
|
47
|
+
guaranteeNonNullable,
|
47
48
|
isBoolean,
|
48
49
|
isNumber,
|
49
50
|
isString,
|
@@ -346,7 +347,7 @@ export const QueryBuilderTDSGridResult = observer(
|
|
346
347
|
resultState.mousedOverCell,
|
347
348
|
true,
|
348
349
|
fetchStructureImplementation,
|
349
|
-
)
|
350
|
+
);
|
350
351
|
},
|
351
352
|
},
|
352
353
|
{
|
@@ -357,7 +358,7 @@ export const QueryBuilderTDSGridResult = observer(
|
|
357
358
|
resultState.mousedOverCell,
|
358
359
|
false,
|
359
360
|
fetchStructureImplementation,
|
360
|
-
)
|
361
|
+
);
|
361
362
|
},
|
362
363
|
},
|
363
364
|
'copy',
|
@@ -376,7 +377,6 @@ export const QueryBuilderTDSGridResult = observer(
|
|
376
377
|
applicationStore,
|
377
378
|
resultState.mousedOverCell,
|
378
379
|
resultState.queryBuilderState.fetchStructureState.implementation,
|
379
|
-
queryBuilderState.applicationStore.alertUnhandledError,
|
380
380
|
],
|
381
381
|
);
|
382
382
|
|
@@ -394,18 +394,22 @@ export const QueryBuilderTDSGridResult = observer(
|
|
394
394
|
aggFuncParams.colDef.field,
|
395
395
|
)
|
396
396
|
? {
|
397
|
-
label:
|
398
|
-
|
397
|
+
label: guaranteeNonNullable(
|
398
|
+
resultState.wavgAggregationState.weightedColumnIdPairs.get(
|
399
|
+
aggFuncParams.colDef.field,
|
400
|
+
),
|
399
401
|
),
|
400
|
-
value:
|
401
|
-
|
402
|
+
value: guaranteeNonNullable(
|
403
|
+
resultState.wavgAggregationState.weightedColumnIdPairs.get(
|
404
|
+
aggFuncParams.colDef.field,
|
405
|
+
),
|
402
406
|
),
|
403
407
|
}
|
404
408
|
: null;
|
405
409
|
|
406
|
-
const onWeightedColumnOptionChange =
|
410
|
+
const onWeightedColumnOptionChange = (
|
407
411
|
option: { label: string; value: string } | null,
|
408
|
-
)
|
412
|
+
) => {
|
409
413
|
if (aggFuncParams?.colDef.field && option?.value) {
|
410
414
|
resultState.wavgAggregationState?.addWeightedColumnIdPair(
|
411
415
|
aggFuncParams.colDef.field,
|