@finos/legend-query-builder 4.14.35 → 4.14.37
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/__lib__/QueryBuilderDocumentation.d.ts +2 -1
- package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderDocumentation.js +1 -0
- package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
- package/lib/__lib__/QueryBuilderTesting.d.ts +1 -0
- package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
- package/lib/__lib__/QueryBuilderTesting.js +1 -0
- package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +55 -19
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +30 -13
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +2 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts +0 -16
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +32 -104
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +2 -1
- package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +50 -5
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +2 -1
- 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 +2 -1
- 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 +18 -6
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +62 -28
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.d.ts +1 -0
- package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +13 -9
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts +1 -0
- package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderVariableSelector.js +2 -2
- package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ClassQueryBuilder.js +19 -16
- 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 +18 -15
- package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
- package/lib/components/workflows/ServiceQueryBuilder.js +13 -10
- package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +2 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderPropertyEditorState.js +12 -34
- package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
- package/lib/stores/QueryBuilderState.d.ts +3 -0
- package/lib/stores/QueryBuilderState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderState.js +15 -1
- package/lib/stores/QueryBuilderState.js.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js +23 -1
- package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +29 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +2 -0
- package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +6 -0
- package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +2 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +15 -0
- package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +3 -0
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +42 -3
- package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.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 +6 -5
- 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 +6 -5
- 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 +8 -37
- 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 +7 -10
- 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 +7 -10
- 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 +6 -5
- package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts +3 -0
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +30 -2
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +5 -4
- 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 +5 -4
- 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 +7 -35
- 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 +6 -8
- 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 +6 -8
- 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 +6 -8
- 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 +6 -8
- 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 +5 -4
- package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts +5 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts.map +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js +7 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
- package/lib/stores/shared/ValueSpecificationEditorHelper.js +20 -10
- package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +0 -2
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js +0 -6
- package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts +2 -2
- package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/MappingQueryBuilderState.js +2 -1
- package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +2 -2
- package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -1
- package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
- package/package.json +4 -4
- package/src/__lib__/QueryBuilderDocumentation.ts +1 -0
- package/src/__lib__/QueryBuilderTesting.ts +1 -0
- package/src/components/QueryBuilder.tsx +179 -54
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +36 -14
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +2 -0
- package/src/components/QueryBuilderSideBar.tsx +138 -339
- package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +6 -1
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +139 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +17 -0
- package/src/components/filter/QueryBuilderFilterPanel.tsx +6 -0
- package/src/components/result/QueryBuilderResultPanel.tsx +63 -6
- package/src/components/shared/BasicValueSpecificationEditor.tsx +96 -34
- package/src/components/shared/CustomDatePicker.tsx +18 -11
- package/src/components/shared/QueryBuilderVariableSelector.tsx +2 -2
- package/src/components/workflows/ClassQueryBuilder.tsx +79 -77
- package/src/components/workflows/MappingQueryBuilder.tsx +75 -76
- package/src/components/workflows/ServiceQueryBuilder.tsx +71 -70
- package/src/index.ts +2 -1
- package/src/stores/QueryBuilderConstantsState.ts +2 -0
- package/src/stores/QueryBuilderPropertyEditorState.ts +15 -53
- package/src/stores/QueryBuilderState.ts +23 -1
- package/src/stores/QueryBuilderValueSpecificationHelper.ts +32 -0
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +39 -0
- package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
- package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +8 -0
- package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +32 -0
- package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +59 -0
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -5
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +5 -5
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +10 -69
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +7 -18
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +7 -18
- package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +5 -5
- package/src/stores/filter/QueryBuilderFilterState.ts +48 -2
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -5
- package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -5
- package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +10 -71
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +6 -14
- package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +6 -14
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +6 -14
- package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +6 -14
- package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -5
- package/src/stores/query-workflow/QueryBuilderWorkFlowState.ts +10 -0
- package/src/stores/shared/ValueSpecificationEditorHelper.ts +32 -16
- package/src/stores/watermark/QueryBuilderWatermarkState.ts +0 -7
- package/src/stores/workflows/MappingQueryBuilderState.ts +7 -1
- package/src/stores/workflows/ServiceQueryBuilderState.ts +6 -1
- package/tsconfig.json +0 -1
- package/lib/components/watermark/QueryBuilderWatermark.d.ts +0 -22
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +0 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +0 -83
- package/lib/components/watermark/QueryBuilderWatermark.js.map +0 -1
- package/src/components/watermark/QueryBuilderWatermark.tsx +0 -218
@@ -18,11 +18,9 @@ import {
|
|
18
18
|
CustomSelectorInput,
|
19
19
|
createFilter,
|
20
20
|
CogIcon,
|
21
|
-
PURE_ClassIcon,
|
22
|
-
PURE_MappingIcon,
|
23
|
-
PURE_RuntimeIcon,
|
24
21
|
ClockIcon,
|
25
22
|
clsx,
|
23
|
+
PanelHeader,
|
26
24
|
} from '@finos/legend-art';
|
27
25
|
import { observer } from 'mobx-react-lite';
|
28
26
|
import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
|
@@ -75,7 +73,7 @@ export const getParameterValue = (
|
|
75
73
|
const generateClassLabel = (
|
76
74
|
val: Class,
|
77
75
|
queryBuilderState: QueryBuilderState,
|
78
|
-
):
|
76
|
+
): React.ReactNode => {
|
79
77
|
const milestoneStereotype = getMilestoneTemporalStereotype(
|
80
78
|
val,
|
81
79
|
queryBuilderState.graphManagerState.graph,
|
@@ -132,10 +130,12 @@ export const QueryBuilderClassSelector = observer(
|
|
132
130
|
option.value.path,
|
133
131
|
});
|
134
132
|
|
135
|
-
const classOptions = classes
|
136
|
-
|
137
|
-
|
138
|
-
|
133
|
+
const classOptions = classes
|
134
|
+
.sort((a, b) => a.name.localeCompare(b.name))
|
135
|
+
.map((_class) => ({
|
136
|
+
value: _class,
|
137
|
+
label: generateClassLabel(_class, queryBuilderState),
|
138
|
+
}));
|
139
139
|
const selectedClassOption = queryBuilderState.class
|
140
140
|
? {
|
141
141
|
value: queryBuilderState.class,
|
@@ -156,257 +156,57 @@ export const QueryBuilderClassSelector = observer(
|
|
156
156
|
|
157
157
|
return (
|
158
158
|
<div className="query-builder__setup__config-group query-builder__setup__config-group--class">
|
159
|
-
<div className="query-builder__setup__config-
|
160
|
-
<
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
159
|
+
<div className="query-builder__setup__config-group__item ">
|
160
|
+
<label
|
161
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
162
|
+
title="entity"
|
163
|
+
htmlFor="query-builder__setup__class-selector"
|
164
|
+
>
|
165
|
+
Entity
|
166
|
+
</label>
|
167
|
+
<CustomSelectorInput
|
168
|
+
inputId="query-builder__setup__class-selector"
|
169
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector query-builder__setup__config-group__item__selector__milestoned"
|
170
|
+
placeholder={
|
171
|
+
classOptions.length
|
172
|
+
? 'Choose an entity...'
|
173
|
+
: noMatchMessage ?? 'No entity found'
|
174
|
+
}
|
175
|
+
disabled={
|
176
|
+
classOptions.length < 1 ||
|
177
|
+
(classOptions.length === 1 && Boolean(selectedClassOption))
|
178
|
+
}
|
179
|
+
noMatchMessage={noMatchMessage}
|
180
|
+
options={classOptions}
|
181
|
+
onChange={changeClass}
|
182
|
+
value={selectedClassOption}
|
183
|
+
darkMode={
|
184
|
+
!applicationStore.layoutService
|
185
|
+
.TEMPORARY__isLightColorThemeEnabled
|
186
|
+
}
|
187
|
+
filterOption={elementFilterOption}
|
188
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
189
|
+
darkMode:
|
183
190
|
!applicationStore.layoutService
|
184
|
-
.TEMPORARY__isLightColorThemeEnabled
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
}
|
192
|
-
|
193
|
-
|
194
|
-
<button
|
195
|
-
className="btn--dark btn__icon--dark query-builder__setup__milestoning"
|
196
|
-
tabIndex={-1}
|
197
|
-
onClick={showMilestoningEditor}
|
198
|
-
disabled={!milestoningState.isMilestonedQuery}
|
199
|
-
title="Edit Milestoning Parameters"
|
200
|
-
>
|
201
|
-
<ClockIcon />
|
202
|
-
</button>
|
203
|
-
)}
|
204
|
-
{milestoningState.isMilestonedQuery && (
|
205
|
-
<MilestoningParametersEditor
|
206
|
-
queryBuilderState={queryBuilderState}
|
207
|
-
/>
|
208
|
-
)}
|
209
|
-
</div>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
);
|
213
|
-
},
|
214
|
-
);
|
215
|
-
|
216
|
-
export const QueryBuilderMappingSelector = observer(
|
217
|
-
(props: {
|
218
|
-
queryBuilderState: QueryBuilderState;
|
219
|
-
classes: Class[];
|
220
|
-
onClassChange?: ((val: Class) => void) | undefined;
|
221
|
-
noMatchMessage?: string | undefined;
|
222
|
-
}) => {
|
223
|
-
const { queryBuilderState, classes, onClassChange, noMatchMessage } = props;
|
224
|
-
const milestoningState = queryBuilderState.milestoningState;
|
225
|
-
const applicationStore = useApplicationStore();
|
226
|
-
|
227
|
-
// class
|
228
|
-
const elementFilterOption = createFilter({
|
229
|
-
ignoreCase: true,
|
230
|
-
ignoreAccents: false,
|
231
|
-
stringify: (option: PackageableElementOption<Class>): string =>
|
232
|
-
option.value.path,
|
233
|
-
});
|
234
|
-
|
235
|
-
const classOptions = classes.map((_class) => ({
|
236
|
-
value: _class,
|
237
|
-
label: generateClassLabel(_class, queryBuilderState),
|
238
|
-
}));
|
239
|
-
const selectedClassOption = queryBuilderState.class
|
240
|
-
? {
|
241
|
-
value: queryBuilderState.class,
|
242
|
-
label: generateClassLabel(queryBuilderState.class, queryBuilderState),
|
243
|
-
}
|
244
|
-
: null;
|
245
|
-
const changeClass = (val: PackageableElementOption<Class>): void => {
|
246
|
-
if (val.value === queryBuilderState.class) {
|
247
|
-
return;
|
248
|
-
}
|
249
|
-
queryBuilderState.changeClass(val.value);
|
250
|
-
onClassChange?.(val.value);
|
251
|
-
};
|
252
|
-
|
253
|
-
// milestoning
|
254
|
-
const showMilestoningEditor = (): void =>
|
255
|
-
milestoningState.setShowMilestoningEditor(true);
|
256
|
-
|
257
|
-
return (
|
258
|
-
<div className="query-builder__setup__config-group query-builder__setup__config-group--class">
|
259
|
-
<div className="query-builder__setup__config-group__content">
|
260
|
-
<div className="query-builder__setup__config-group__item ">
|
261
|
-
<div
|
262
|
-
className="btn--sm query-builder__setup__config-group__item__label"
|
263
|
-
title="class"
|
191
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
192
|
+
})}
|
193
|
+
/>
|
194
|
+
{queryBuilderState.isQuerySupported && (
|
195
|
+
<button
|
196
|
+
className="btn--dark btn__icon--dark query-builder__setup__milestoning"
|
197
|
+
tabIndex={-1}
|
198
|
+
onClick={showMilestoningEditor}
|
199
|
+
disabled={!milestoningState.isMilestonedQuery}
|
200
|
+
title="Edit Milestoning Parameters"
|
264
201
|
>
|
265
|
-
<
|
266
|
-
</
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
? 'Choose a class...'
|
272
|
-
: noMatchMessage ?? 'No class found'
|
273
|
-
}
|
274
|
-
disabled={
|
275
|
-
classOptions.length < 1 ||
|
276
|
-
(classOptions.length === 1 && Boolean(selectedClassOption))
|
277
|
-
}
|
278
|
-
noMatchMessage={noMatchMessage}
|
279
|
-
options={classOptions}
|
280
|
-
onChange={changeClass}
|
281
|
-
value={selectedClassOption}
|
282
|
-
darkMode={
|
283
|
-
!applicationStore.layoutService
|
284
|
-
.TEMPORARY__isLightColorThemeEnabled
|
285
|
-
}
|
286
|
-
filterOption={elementFilterOption}
|
287
|
-
formatOptionLabel={getPackageableElementOptionFormatter({
|
288
|
-
darkMode:
|
289
|
-
!applicationStore.layoutService
|
290
|
-
.TEMPORARY__isLightColorThemeEnabled,
|
291
|
-
})}
|
202
|
+
<ClockIcon />
|
203
|
+
</button>
|
204
|
+
)}
|
205
|
+
{milestoningState.isMilestonedQuery && (
|
206
|
+
<MilestoningParametersEditor
|
207
|
+
queryBuilderState={queryBuilderState}
|
292
208
|
/>
|
293
|
-
|
294
|
-
<button
|
295
|
-
className="btn--dark btn__icon--dark query-builder__setup__milestoning"
|
296
|
-
tabIndex={-1}
|
297
|
-
onClick={showMilestoningEditor}
|
298
|
-
disabled={!milestoningState.isMilestonedQuery}
|
299
|
-
title="Edit Milestoning Parameters"
|
300
|
-
>
|
301
|
-
<ClockIcon />
|
302
|
-
</button>
|
303
|
-
)}
|
304
|
-
{milestoningState.isMilestonedQuery && (
|
305
|
-
<MilestoningParametersEditor
|
306
|
-
queryBuilderState={queryBuilderState}
|
307
|
-
/>
|
308
|
-
)}
|
309
|
-
</div>
|
310
|
-
</div>
|
311
|
-
</div>
|
312
|
-
);
|
313
|
-
},
|
314
|
-
);
|
315
|
-
|
316
|
-
export const QueryBuilderFunction = observer(
|
317
|
-
(props: {
|
318
|
-
queryBuilderState: QueryBuilderState;
|
319
|
-
classes: Class[];
|
320
|
-
onClassChange?: ((val: Class) => void) | undefined;
|
321
|
-
noMatchMessage?: string | undefined;
|
322
|
-
}) => {
|
323
|
-
const { queryBuilderState, classes, onClassChange, noMatchMessage } = props;
|
324
|
-
const milestoningState = queryBuilderState.milestoningState;
|
325
|
-
const applicationStore = useApplicationStore();
|
326
|
-
|
327
|
-
// class
|
328
|
-
const elementFilterOption = createFilter({
|
329
|
-
ignoreCase: true,
|
330
|
-
ignoreAccents: false,
|
331
|
-
stringify: (option: PackageableElementOption<Class>): string =>
|
332
|
-
option.value.path,
|
333
|
-
});
|
334
|
-
|
335
|
-
const classOptions = classes.map((_class) => ({
|
336
|
-
value: _class,
|
337
|
-
label: generateClassLabel(_class, queryBuilderState),
|
338
|
-
}));
|
339
|
-
const selectedClassOption = queryBuilderState.class
|
340
|
-
? {
|
341
|
-
value: queryBuilderState.class,
|
342
|
-
label: generateClassLabel(queryBuilderState.class, queryBuilderState),
|
343
|
-
}
|
344
|
-
: null;
|
345
|
-
const changeClass = (val: PackageableElementOption<Class>): void => {
|
346
|
-
if (val.value === queryBuilderState.class) {
|
347
|
-
return;
|
348
|
-
}
|
349
|
-
queryBuilderState.changeClass(val.value);
|
350
|
-
onClassChange?.(val.value);
|
351
|
-
};
|
352
|
-
|
353
|
-
// milestoning
|
354
|
-
const showMilestoningEditor = (): void =>
|
355
|
-
milestoningState.setShowMilestoningEditor(true);
|
356
|
-
|
357
|
-
return (
|
358
|
-
<div className="query-builder__setup__config-group query-builder__setup__config-group--class">
|
359
|
-
<div className="query-builder__setup__config-group__content">
|
360
|
-
<div className="query-builder__setup__config-group__item ">
|
361
|
-
<div
|
362
|
-
className="btn--sm query-builder__setup__config-group__item__label"
|
363
|
-
title="class"
|
364
|
-
>
|
365
|
-
<PURE_ClassIcon />
|
366
|
-
</div>
|
367
|
-
<CustomSelectorInput
|
368
|
-
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector query-builder__setup__config-group__item__selector__milestoned"
|
369
|
-
placeholder={
|
370
|
-
classOptions.length
|
371
|
-
? 'Choose a class...'
|
372
|
-
: noMatchMessage ?? 'No class found'
|
373
|
-
}
|
374
|
-
disabled={
|
375
|
-
classOptions.length < 1 ||
|
376
|
-
(classOptions.length === 1 && Boolean(selectedClassOption))
|
377
|
-
}
|
378
|
-
noMatchMessage={noMatchMessage}
|
379
|
-
options={classOptions}
|
380
|
-
onChange={changeClass}
|
381
|
-
value={selectedClassOption}
|
382
|
-
darkMode={
|
383
|
-
!applicationStore.layoutService
|
384
|
-
.TEMPORARY__isLightColorThemeEnabled
|
385
|
-
}
|
386
|
-
filterOption={elementFilterOption}
|
387
|
-
formatOptionLabel={getPackageableElementOptionFormatter({
|
388
|
-
darkMode:
|
389
|
-
!applicationStore.layoutService
|
390
|
-
.TEMPORARY__isLightColorThemeEnabled,
|
391
|
-
})}
|
392
|
-
/>
|
393
|
-
{queryBuilderState.isQuerySupported && (
|
394
|
-
<button
|
395
|
-
className="btn--dark btn__icon--dark query-builder__setup__milestoning"
|
396
|
-
tabIndex={-1}
|
397
|
-
onClick={showMilestoningEditor}
|
398
|
-
disabled={!milestoningState.isMilestonedQuery}
|
399
|
-
title="Edit Milestoning Parameters"
|
400
|
-
>
|
401
|
-
<ClockIcon />
|
402
|
-
</button>
|
403
|
-
)}
|
404
|
-
{milestoningState.isMilestonedQuery && (
|
405
|
-
<MilestoningParametersEditor
|
406
|
-
queryBuilderState={queryBuilderState}
|
407
|
-
/>
|
408
|
-
)}
|
409
|
-
</div>
|
209
|
+
)}
|
410
210
|
</div>
|
411
211
|
</div>
|
412
212
|
);
|
@@ -454,10 +254,9 @@ const BasicQueryBuilderSetup = observer(
|
|
454
254
|
const classes = queryBuilderState.graphManagerState.usableClasses;
|
455
255
|
|
456
256
|
// mapping
|
457
|
-
const mappingOptions =
|
458
|
-
|
459
|
-
|
460
|
-
);
|
257
|
+
const mappingOptions = queryBuilderState.graphManagerState.usableMappings
|
258
|
+
.map(buildElementOption)
|
259
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
461
260
|
const selectedMappingOption = queryBuilderState.executionContextState
|
462
261
|
.mapping
|
463
262
|
? buildElementOption(queryBuilderState.executionContextState.mapping)
|
@@ -485,7 +284,8 @@ const BasicQueryBuilderSetup = observer(
|
|
485
284
|
(rt) =>
|
486
285
|
new RuntimePointer(PackageableElementExplicitReference.create(rt)),
|
487
286
|
)
|
488
|
-
.map(buildRuntimeValueOption)
|
287
|
+
.map(buildRuntimeValueOption)
|
288
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
489
289
|
const selectedRuntimeOption = queryBuilderState.executionContextState
|
490
290
|
.runtimeValue
|
491
291
|
? buildRuntimeValueOption(
|
@@ -511,88 +311,87 @@ const BasicQueryBuilderSetup = observer(
|
|
511
311
|
});
|
512
312
|
|
513
313
|
return (
|
514
|
-
|
515
|
-
<
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
value={selectedMappingOption}
|
547
|
-
darkMode={
|
314
|
+
<div className="query-builder__setup__config-group">
|
315
|
+
<PanelHeader title="properties" />
|
316
|
+
<div className="query-builder__setup__config-group__content">
|
317
|
+
<div className="query-builder__setup__config-group__item">
|
318
|
+
<label
|
319
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
320
|
+
title="mapping"
|
321
|
+
htmlFor="query-builder__setup__mapping-selector"
|
322
|
+
>
|
323
|
+
Mapping
|
324
|
+
</label>
|
325
|
+
<CustomSelectorInput
|
326
|
+
inputId="query-builder__setup__mapping-selector"
|
327
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
328
|
+
placeholder={
|
329
|
+
mappingOptions.length
|
330
|
+
? 'Choose a mapping...'
|
331
|
+
: 'No mapping found'
|
332
|
+
}
|
333
|
+
disabled={
|
334
|
+
queryBuilderState.isMappingReadOnly || !queryBuilderState.class
|
335
|
+
}
|
336
|
+
options={mappingOptions}
|
337
|
+
onChange={changeMapping}
|
338
|
+
value={selectedMappingOption}
|
339
|
+
darkMode={
|
340
|
+
!applicationStore.layoutService
|
341
|
+
.TEMPORARY__isLightColorThemeEnabled
|
342
|
+
}
|
343
|
+
filterOption={mappingFilterOption}
|
344
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
345
|
+
darkMode:
|
548
346
|
!applicationStore.layoutService
|
549
|
-
.TEMPORARY__isLightColorThemeEnabled
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
347
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
348
|
+
})}
|
349
|
+
/>
|
350
|
+
</div>
|
351
|
+
<div className="query-builder__setup__config-group__item">
|
352
|
+
<label
|
353
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
354
|
+
title="runtime"
|
355
|
+
htmlFor="query-builder__setup__runtime-selector"
|
356
|
+
>
|
357
|
+
Runtime
|
358
|
+
</label>
|
359
|
+
<CustomSelectorInput
|
360
|
+
inputId="query-builder__setup__runtime-selector"
|
361
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
362
|
+
placeholder={
|
363
|
+
runtimeOptions.length
|
364
|
+
? 'Choose a runtime...'
|
365
|
+
: 'No runtime found'
|
366
|
+
}
|
367
|
+
disabled={
|
368
|
+
queryBuilderState.isRuntimeReadOnly ||
|
369
|
+
!queryBuilderState.class ||
|
370
|
+
!queryBuilderState.executionContextState.mapping
|
371
|
+
}
|
372
|
+
options={runtimeOptions}
|
373
|
+
onChange={changeRuntime}
|
374
|
+
value={selectedRuntimeOption}
|
375
|
+
darkMode={
|
376
|
+
!applicationStore.layoutService
|
377
|
+
.TEMPORARY__isLightColorThemeEnabled
|
378
|
+
}
|
379
|
+
filterOption={runtimeFilterOption}
|
380
|
+
formatOptionLabel={getRuntimeOptionFormatter({
|
381
|
+
darkMode:
|
582
382
|
!applicationStore.layoutService
|
583
|
-
.TEMPORARY__isLightColorThemeEnabled
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
</div>
|
383
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
384
|
+
})}
|
385
|
+
/>
|
386
|
+
</div>
|
387
|
+
<div className="query-builder__setup__config-group__item">
|
388
|
+
<QueryBuilderClassSelector
|
389
|
+
queryBuilderState={queryBuilderState}
|
390
|
+
classes={classes}
|
391
|
+
/>
|
593
392
|
</div>
|
594
393
|
</div>
|
595
|
-
|
394
|
+
</div>
|
596
395
|
);
|
597
396
|
},
|
598
397
|
);
|
@@ -109,6 +109,7 @@ import {
|
|
109
109
|
} from '../../stores/fetch-structure/tds/window/QueryBuilderWindowState.js';
|
110
110
|
import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
|
111
111
|
import { QueryBuilderTelemetryHelper } from '../../__lib__/QueryBuilderTelemetryHelper.js';
|
112
|
+
import { QueryBuilderPanelIssueCountBadge } from '../shared/QueryBuilderPanelIssueCountBadge.js';
|
112
113
|
|
113
114
|
const QueryBuilderPostFilterConditionContextMenu = observer(
|
114
115
|
forwardRef<
|
@@ -1008,6 +1009,11 @@ const QueryBuilderPostFilterPanelContent = observer(
|
|
1008
1009
|
<div className="panel__header">
|
1009
1010
|
<div className="panel__header__title">
|
1010
1011
|
<div className="panel__header__title__label">post-filter</div>
|
1012
|
+
{postFilterState.allValidationIssues.length !== 0 && (
|
1013
|
+
<QueryBuilderPanelIssueCountBadge
|
1014
|
+
issues={postFilterState.allValidationIssues}
|
1015
|
+
/>
|
1016
|
+
)}
|
1011
1017
|
</div>
|
1012
1018
|
<div className="panel__header__actions">
|
1013
1019
|
<DropdownMenu
|
@@ -1141,7 +1147,6 @@ export const QueryBuilderPostFilterPanel = observer(
|
|
1141
1147
|
const { queryBuilderState } = props;
|
1142
1148
|
const fetchStructureImplementation =
|
1143
1149
|
queryBuilderState.fetchStructureState.implementation;
|
1144
|
-
|
1145
1150
|
return (
|
1146
1151
|
<div
|
1147
1152
|
data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_POST_FILTER_PANEL}
|