@finos/legend-query-builder 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +3 -3
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +2 -2
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +5 -6
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +7 -12
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +6 -6
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +3 -5
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js +5 -6
- package/lib/components/explorer/QueryBuilderPropertySearchPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js +1 -1
- package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +87 -76
- 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 +13 -14
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.d.ts.map +1 -1
- package/lib/graphManager/QueryBuilderSupportedFunctions.js +1 -0
- package/lib/graphManager/QueryBuilderSupportedFunctions.js.map +1 -1
- package/lib/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +8 -8
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
- package/lib/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +17 -26
- package/lib/graphManager/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 +11 -10
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts +4 -4
- package/lib/stores/QueryBuilderChangeDetectionState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderChangeDetectionState.js +9 -9
- package/lib/stores/QueryBuilderChangeDetectionState.js.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +4 -4
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +2 -3
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +9 -12
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +4 -2
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +7 -7
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.d.ts +2 -2
- package/lib/stores/QueryBuilderStateBuilder.d.ts.map +1 -1
- package/lib/stores/QueryBuilderStateBuilder.js +10 -12
- package/lib/stores/QueryBuilderStateBuilder.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js +1 -1
- package/lib/stores/QueryBuilderValueSpecificationBuilderHelper.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +9 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +22 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +2 -2
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js +22 -15
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +6 -3
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +4 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +4 -2
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +2 -1
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +2 -2
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +1 -14
- package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js +9 -2
- package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +4 -3
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +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.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_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.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.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js +3 -3
- package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
- package/lib/stores/shared/LambdaParameterState.d.ts +2 -2
- package/lib/stores/shared/LambdaParameterState.d.ts.map +1 -1
- package/lib/stores/shared/LambdaParameterState.js +5 -5
- package/lib/stores/shared/LambdaParameterState.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +4 -4
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +11 -15
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts +8 -8
- package/lib/stores/shared/ValueSpecificationModifierHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationModifierHelper.js +20 -17
- package/lib/stores/shared/ValueSpecificationModifierHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
- package/package.json +18 -17
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +3 -1
- package/src/components/QueryBuilderParametersPanel.tsx +2 -2
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +6 -6
- package/src/components/QueryBuilderResultPanel.tsx +18 -14
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +10 -11
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +7 -5
- package/src/components/explorer/QueryBuilderPropertySearchPanel.tsx +9 -6
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +1 -1
- package/src/components/filter/QueryBuilderFilterPanel.tsx +1 -1
- package/src/components/shared/BasicValueSpecificationEditor.tsx +180 -106
- package/src/components/shared/CustomDatePicker.tsx +54 -26
- package/src/components/watermark/QueryBuilderWatermark.tsx +1 -3
- package/src/graphManager/QueryBuilderSupportedFunctions.ts +4 -0
- package/src/graphManager/protocol/pure/QueryBuilder_PureProtocolProcessorPlugin.ts +1 -1
- package/src/graphManager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +67 -68
- package/src/stores/QueryBuilderChangeDetectionState.ts +13 -11
- package/src/stores/QueryBuilderConstantsState.ts +4 -3
- package/src/stores/QueryBuilderPropertyEditorState.ts +17 -13
- package/src/stores/QueryBuilderState.ts +7 -9
- package/src/stores/QueryBuilderStateBuilder.ts +10 -12
- package/src/stores/QueryBuilderValueSpecificationBuilderHelper.ts +1 -1
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +36 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +10 -2
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +1 -1
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterStateBuilder.ts +26 -20
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +2 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +2 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +14 -3
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +4 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +4 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +2 -0
- package/src/stores/filter/QueryBuilderFilterState.ts +2 -2
- package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +0 -20
- package/src/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.ts +17 -4
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +1 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +1 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +12 -3
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +2 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +2 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +2 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +2 -0
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +1 -0
- package/src/stores/milestoning/QueryBuilderMilestoningState.ts +3 -9
- package/src/stores/shared/LambdaParameterState.ts +9 -5
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +24 -9
- package/src/stores/shared/ValueSpecificationModifierHelper.ts +42 -20
- package/src/stores/watermark/QueryBuilderWatermarkState.ts +1 -4
@@ -155,6 +155,7 @@ const QueryBuilderGridResultContextMenu = observer(
|
|
155
155
|
)
|
156
156
|
: event?.value,
|
157
157
|
0,
|
158
|
+
tdsState.queryBuilderState.observerContext,
|
158
159
|
);
|
159
160
|
}
|
160
161
|
};
|
@@ -230,10 +231,11 @@ const QueryBuilderGridResultContextMenu = observer(
|
|
230
231
|
conditionState.changeOperator(
|
231
232
|
isFilterBy ? postFilterInOperator : postFilterNotInOperator,
|
232
233
|
);
|
233
|
-
instanceValue_setValues(
|
234
|
-
|
235
|
-
newValueSpecification,
|
236
|
-
|
234
|
+
instanceValue_setValues(
|
235
|
+
conditionState.value as InstanceValue,
|
236
|
+
[currentValueSpecificaton, newValueSpecification],
|
237
|
+
tdsState.queryBuilderState.observerContext,
|
238
|
+
);
|
237
239
|
}
|
238
240
|
} else {
|
239
241
|
const doesValueAlreadyExist =
|
@@ -252,10 +254,14 @@ const QueryBuilderGridResultContextMenu = observer(
|
|
252
254
|
isFilterBy ? postFilterEqualOperator : postFilterNotEqualOperator
|
253
255
|
).getDefaultFilterConditionValue(conditionState);
|
254
256
|
updateFilterConditionValue(newValueSpecification as InstanceValue);
|
255
|
-
instanceValue_setValues(
|
256
|
-
|
257
|
-
|
258
|
-
|
257
|
+
instanceValue_setValues(
|
258
|
+
conditionState.value as InstanceValue,
|
259
|
+
[
|
260
|
+
...(conditionState.value as InstanceValue).values,
|
261
|
+
newValueSpecification,
|
262
|
+
],
|
263
|
+
tdsState.queryBuilderState.observerContext,
|
264
|
+
);
|
259
265
|
}
|
260
266
|
}
|
261
267
|
};
|
@@ -326,18 +332,16 @@ const QueryBuilderGridResult = observer(
|
|
326
332
|
const [cellDoubleClickedEvent, setCellDoubleClickedEvent] =
|
327
333
|
useState<CellMouseOverEvent | null>(null);
|
328
334
|
const columns = executionResult.result.columns;
|
329
|
-
|
330
|
-
const rowData = executionResult.result.rows.map((_row) => {
|
335
|
+
const rowData = executionResult.result.rows.map((_row, rowIdx) => {
|
331
336
|
const row: PlainObject = {};
|
332
337
|
const cols = executionResult.result.columns;
|
333
|
-
_row.values.forEach((value,
|
338
|
+
_row.values.forEach((value, colIdx) => {
|
334
339
|
// `ag-grid` shows `false` value as empty string so we have
|
335
340
|
// call `.toString()` to avoid this behavior.
|
336
341
|
// See https://github.com/finos/legend-studio/issues/1008
|
337
|
-
row[cols[
|
338
|
-
row.rowNumber = rowNumber;
|
342
|
+
row[cols[colIdx] as string] = isBoolean(value) ? String(value) : value;
|
339
343
|
});
|
340
|
-
rowNumber
|
344
|
+
row.rowNumber = rowIdx;
|
341
345
|
return row;
|
342
346
|
});
|
343
347
|
|
@@ -69,10 +69,7 @@ import { useDrag } from 'react-dnd';
|
|
69
69
|
import { QueryBuilderPropertyInfoTooltip } from '../shared/QueryBuilderPropertyInfoTooltip.js';
|
70
70
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
71
71
|
import { flowResult } from 'mobx';
|
72
|
-
import {
|
73
|
-
getPropertyChainName,
|
74
|
-
prettyPropertyName,
|
75
|
-
} from '../../stores/QueryBuilderPropertyEditorState.js';
|
72
|
+
import { getPropertyChainName } from '../../stores/QueryBuilderPropertyEditorState.js';
|
76
73
|
import {
|
77
74
|
type Type,
|
78
75
|
type Multiplicity,
|
@@ -92,7 +89,11 @@ import {
|
|
92
89
|
import { useApplicationStore } from '@finos/legend-application';
|
93
90
|
import { getClassPropertyIcon } from '../shared/ElementIconUtils.js';
|
94
91
|
import { QUERY_BUILDER_TEST_ID } from '../../application/QueryBuilderTesting.js';
|
95
|
-
import {
|
92
|
+
import {
|
93
|
+
filterByType,
|
94
|
+
guaranteeNonNullable,
|
95
|
+
prettyCONSTName,
|
96
|
+
} from '@finos/legend-shared';
|
96
97
|
import { QueryBuilderPropertySearchPanel } from './QueryBuilderPropertySearchPanel.js';
|
97
98
|
import { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
|
98
99
|
import { QueryBuilderSimpleProjectionColumnState } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
@@ -226,9 +227,7 @@ const QueryBuilderExplorerPreviewDataModal = observer(
|
|
226
227
|
darkMode={true}
|
227
228
|
className="editor-modal query-builder__explorer__preview-data-modal"
|
228
229
|
>
|
229
|
-
<ModalHeader
|
230
|
-
title={prettyPropertyName(previewDataState.propertyName)}
|
231
|
-
/>
|
230
|
+
<ModalHeader title={prettyCONSTName(previewDataState.propertyName)} />
|
232
231
|
<PanelLoadingIndicator
|
233
232
|
isLoading={previewDataState.isGeneratingPreviewData}
|
234
233
|
/>
|
@@ -577,8 +576,8 @@ const QueryBuilderExplorerTreeNodeContainer = observer(
|
|
577
576
|
>
|
578
577
|
{explorerState.humanizePropertyName
|
579
578
|
? node instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
580
|
-
? TYPE_CAST_TOKEN +
|
581
|
-
:
|
579
|
+
? TYPE_CAST_TOKEN + prettyCONSTName(node.label)
|
580
|
+
: prettyCONSTName(node.label)
|
582
581
|
: node instanceof QueryBuilderExplorerTreeSubTypeNodeData
|
583
582
|
? TYPE_CAST_TOKEN + node.label
|
584
583
|
: node.label}
|
@@ -942,7 +941,7 @@ export const QueryBuilderExplorerPanel = observer(
|
|
942
941
|
<DragPreviewLayer
|
943
942
|
labelGetter={(item: QueryBuilderExplorerTreeDragSource): string =>
|
944
943
|
explorerState.humanizePropertyName
|
945
|
-
?
|
944
|
+
? prettyCONSTName(item.node.label)
|
946
945
|
: item.node.label
|
947
946
|
}
|
948
947
|
types={Object.values(QUERY_BUILDER_EXPLORER_TREE_DND_TYPE)}
|
@@ -104,11 +104,13 @@ const MilestoningParameterEditor = observer(
|
|
104
104
|
new GenericType(PrimitiveType.STRICTDATE),
|
105
105
|
),
|
106
106
|
),
|
107
|
-
queryBuilderState.
|
107
|
+
queryBuilderState.observerContext,
|
108
|
+
);
|
109
|
+
instanceValue_setValues(
|
110
|
+
parameter,
|
111
|
+
[generateDefaultValueForPrimitiveType(PRIMITIVE_TYPE.STRICTDATE)],
|
112
|
+
queryBuilderState.observerContext,
|
108
113
|
);
|
109
|
-
instanceValue_setValues(parameter, [
|
110
|
-
generateDefaultValueForPrimitiveType(PRIMITIVE_TYPE.STRICTDATE),
|
111
|
-
]);
|
112
114
|
if (stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
|
113
115
|
queryBuilderState.milestoningState.setBusinessDate(parameter);
|
114
116
|
} else {
|
@@ -126,7 +128,7 @@ const MilestoningParameterEditor = observer(
|
|
126
128
|
<BasicValueSpecificationEditor
|
127
129
|
valueSpecification={milestoningParameter}
|
128
130
|
graph={queryBuilderState.graphManagerState.graph}
|
129
|
-
obseverContext={queryBuilderState.
|
131
|
+
obseverContext={queryBuilderState.observerContext}
|
130
132
|
setValueSpecification={(val: ValueSpecification): void =>
|
131
133
|
stereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL
|
132
134
|
? queryBuilderState.milestoningState.setBusinessDate(val)
|
@@ -38,7 +38,11 @@ import {
|
|
38
38
|
getAllClassProperties,
|
39
39
|
getAllOwnClassProperties,
|
40
40
|
} from '@finos/legend-graph';
|
41
|
-
import {
|
41
|
+
import {
|
42
|
+
debounce,
|
43
|
+
guaranteeNonNullable,
|
44
|
+
prettyCONSTName,
|
45
|
+
} from '@finos/legend-shared';
|
42
46
|
import { observer } from 'mobx-react-lite';
|
43
47
|
import { useDrag } from 'react-dnd';
|
44
48
|
import { QUERY_BUILDER_PROPERTY_SEARCH_TYPE } from '../../stores/QueryBuilderConfig.js';
|
@@ -50,7 +54,6 @@ import {
|
|
50
54
|
getQueryBuilderPropertyNodeData,
|
51
55
|
type QueryBuilderExplorerState,
|
52
56
|
} from '../../stores/explorer/QueryBuilderExplorerState.js';
|
53
|
-
import { prettyPropertyName } from '../../stores/QueryBuilderPropertyEditorState.js';
|
54
57
|
import type { QueryBuilderState } from '../../stores/QueryBuilderState.js';
|
55
58
|
import {
|
56
59
|
QueryBuilderSubclassInfoTooltip,
|
@@ -62,7 +65,7 @@ import { TextSearchAdvancedConfigMenu } from '@finos/legend-application';
|
|
62
65
|
|
63
66
|
const prettyPropertyNameFromNodeId = (name: string): string => {
|
64
67
|
let propNameArray = name.split('.');
|
65
|
-
propNameArray = propNameArray.map(
|
68
|
+
propNameArray = propNameArray.map(prettyCONSTName);
|
66
69
|
let propName = '';
|
67
70
|
propNameArray.forEach((p) => {
|
68
71
|
propName = `${propName + p}/`;
|
@@ -76,7 +79,7 @@ const prettyPropertyNameForSubType = (name: string): string => {
|
|
76
79
|
propNameArray = propNameArray
|
77
80
|
.map((p) => p.replace(/.*::/, ''))
|
78
81
|
.filter((p) => p !== '')
|
79
|
-
.map((p) =>
|
82
|
+
.map((p) => prettyCONSTName(p));
|
80
83
|
let propName = '';
|
81
84
|
propNameArray.slice(0, -1).forEach((p) => {
|
82
85
|
propName = `${propName}(@${p})/`;
|
@@ -84,7 +87,7 @@ const prettyPropertyNameForSubType = (name: string): string => {
|
|
84
87
|
propNameArray = guaranteeNonNullable(
|
85
88
|
propNameArray[propNameArray.length - 1],
|
86
89
|
).split('.');
|
87
|
-
propNameArray = propNameArray.map((p) =>
|
90
|
+
propNameArray = propNameArray.map((p) => prettyCONSTName(p));
|
88
91
|
propName = `${propName}(@${propNameArray[0]})/`;
|
89
92
|
propNameArray.slice(1).forEach((p) => {
|
90
93
|
propName = `${propName + p}/`;
|
@@ -98,7 +101,7 @@ const prettyPropertyNameForSubTypeClass = (name: string): string => {
|
|
98
101
|
propNameArray = propNameArray
|
99
102
|
.map((p) => p.replace(/.*::/, ''))
|
100
103
|
.filter((p) => p !== '')
|
101
|
-
.map((p) =>
|
104
|
+
.map((p) => prettyCONSTName(p));
|
102
105
|
let propName = '';
|
103
106
|
propNameArray.forEach((p) => {
|
104
107
|
propName = `${propName}@${p}`;
|
@@ -416,7 +416,7 @@ const QueryBuilderPostFilterConditionEditor = observer(
|
|
416
416
|
valueSpecification={node.condition.value}
|
417
417
|
setValueSpecification={changeValueSpecification}
|
418
418
|
graph={graph}
|
419
|
-
obseverContext={queryBuilderState.
|
419
|
+
obseverContext={queryBuilderState.observerContext}
|
420
420
|
typeCheckOption={{
|
421
421
|
expectedType: guaranteeNonNullable(
|
422
422
|
node.condition.columnState.getColumnType(),
|
@@ -269,7 +269,7 @@ const QueryBuilderFilterConditionEditor = observer(
|
|
269
269
|
valueSpecification={node.condition.value}
|
270
270
|
setValueSpecification={changeValueSpecification}
|
271
271
|
graph={graph}
|
272
|
-
obseverContext={queryBuilderState.
|
272
|
+
obseverContext={queryBuilderState.observerContext}
|
273
273
|
typeCheckOption={{
|
274
274
|
expectedType:
|
275
275
|
node.condition.propertyExpressionState
|