@finos/legend-query-builder 4.14.35 → 4.14.36
Sign up to get free protection for your applications and to get access to all the features.
- 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 +37 -17
- 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/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 +13 -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__/QueryBuilderTesting.ts +1 -0
- package/src/components/QueryBuilder.tsx +89 -46
- 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/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 +18 -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
@@ -16,9 +16,8 @@
|
|
16
16
|
|
17
17
|
import {
|
18
18
|
CustomSelectorInput,
|
19
|
+
PanelHeader,
|
19
20
|
createFilter,
|
20
|
-
PURE_MappingIcon,
|
21
|
-
PURE_RuntimeIcon,
|
22
21
|
} from '@finos/legend-art';
|
23
22
|
import { observer } from 'mobx-react-lite';
|
24
23
|
import {
|
@@ -70,7 +69,9 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
70
69
|
queryBuilderState.graphManagerState.usableMappings,
|
71
70
|
)
|
72
71
|
: []
|
73
|
-
)
|
72
|
+
)
|
73
|
+
.map(buildElementOption)
|
74
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
74
75
|
const selectedMappingOption = queryBuilderState.executionContextState
|
75
76
|
.mapping
|
76
77
|
? buildElementOption(queryBuilderState.executionContextState.mapping)
|
@@ -105,7 +106,8 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
105
106
|
(rt) =>
|
106
107
|
new RuntimePointer(PackageableElementExplicitReference.create(rt)),
|
107
108
|
)
|
108
|
-
.map(buildRuntimeValueOption)
|
109
|
+
.map(buildRuntimeValueOption)
|
110
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
109
111
|
const selectedRuntimeOption = queryBuilderState.executionContextState
|
110
112
|
.runtimeValue
|
111
113
|
? buildRuntimeValueOption(
|
@@ -128,83 +130,83 @@ const ClassQueryBuilderSetupPanelContent = observer(
|
|
128
130
|
});
|
129
131
|
|
130
132
|
return (
|
131
|
-
|
132
|
-
<
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
</
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
value={selectedMappingOption}
|
163
|
-
darkMode={
|
133
|
+
<div className="query-builder__setup__config-group">
|
134
|
+
<PanelHeader title="properties" />
|
135
|
+
<div className="query-builder__setup__config-group__content">
|
136
|
+
<div className="query-builder__setup__config-group__item">
|
137
|
+
<label
|
138
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
139
|
+
title="mapping"
|
140
|
+
htmlFor="query-builder__setup__mapping-selector"
|
141
|
+
>
|
142
|
+
Mapping
|
143
|
+
</label>
|
144
|
+
<CustomSelectorInput
|
145
|
+
inputId="query-builder__setup__mapping-selector"
|
146
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
147
|
+
placeholder={
|
148
|
+
mappingOptions.length
|
149
|
+
? 'Choose a mapping...'
|
150
|
+
: 'No compatible mapping found for class'
|
151
|
+
}
|
152
|
+
noMatchMessage="No compatible mapping found for specified class"
|
153
|
+
disabled={!queryBuilderState.class}
|
154
|
+
options={mappingOptions}
|
155
|
+
onChange={changeMapping}
|
156
|
+
value={selectedMappingOption}
|
157
|
+
darkMode={
|
158
|
+
!applicationStore.layoutService
|
159
|
+
.TEMPORARY__isLightColorThemeEnabled
|
160
|
+
}
|
161
|
+
filterOption={mappingFilterOption}
|
162
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
163
|
+
darkMode:
|
164
164
|
!applicationStore.layoutService
|
165
|
-
.TEMPORARY__isLightColorThemeEnabled
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
165
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
166
|
+
})}
|
167
|
+
/>
|
168
|
+
</div>
|
169
|
+
<div className="query-builder__setup__config-group__item">
|
170
|
+
<label
|
171
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
172
|
+
title="runtime"
|
173
|
+
htmlFor="query-builder__setup__runtime-selector"
|
174
|
+
>
|
175
|
+
Runtime
|
176
|
+
</label>
|
177
|
+
<CustomSelectorInput
|
178
|
+
inputId="query-builder__setup__runtime-selector"
|
179
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
180
|
+
placeholder="Choose a runtime..."
|
181
|
+
noMatchMessage="No compatible runtime found for specified mapping"
|
182
|
+
disabled={
|
183
|
+
!queryBuilderState.class ||
|
184
|
+
!queryBuilderState.executionContextState.mapping
|
185
|
+
}
|
186
|
+
options={runtimeOptions}
|
187
|
+
onChange={changeRuntime}
|
188
|
+
value={selectedRuntimeOption}
|
189
|
+
darkMode={
|
190
|
+
!applicationStore.layoutService
|
191
|
+
.TEMPORARY__isLightColorThemeEnabled
|
192
|
+
}
|
193
|
+
filterOption={runtimeFilterOption}
|
194
|
+
formatOptionLabel={getRuntimeOptionFormatter({
|
195
|
+
darkMode:
|
194
196
|
!applicationStore.layoutService
|
195
|
-
.TEMPORARY__isLightColorThemeEnabled
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
197
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
198
|
+
})}
|
199
|
+
/>
|
200
|
+
</div>
|
201
|
+
<div className="query-builder__setup__config-group__item">
|
202
|
+
<QueryBuilderClassSelector
|
203
|
+
queryBuilderState={queryBuilderState}
|
204
|
+
classes={classes}
|
205
|
+
onClassChange={onClassChange}
|
206
|
+
/>
|
205
207
|
</div>
|
206
208
|
</div>
|
207
|
-
|
209
|
+
</div>
|
208
210
|
);
|
209
211
|
},
|
210
212
|
);
|
@@ -16,9 +16,8 @@
|
|
16
16
|
|
17
17
|
import {
|
18
18
|
CustomSelectorInput,
|
19
|
+
PanelHeader,
|
19
20
|
createFilter,
|
20
|
-
PURE_MappingIcon,
|
21
|
-
PURE_RuntimeIcon,
|
22
21
|
} from '@finos/legend-art';
|
23
22
|
import { observer } from 'mobx-react-lite';
|
24
23
|
import {
|
@@ -58,10 +57,9 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
58
57
|
const applicationStore = useApplicationStore();
|
59
58
|
|
60
59
|
// mapping
|
61
|
-
const mappingOptions =
|
62
|
-
|
63
|
-
|
64
|
-
);
|
60
|
+
const mappingOptions = queryBuilderState.graphManagerState.usableMappings
|
61
|
+
.map(buildElementOption)
|
62
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
65
63
|
const selectedMappingOption = queryBuilderState.executionContextState
|
66
64
|
.mapping
|
67
65
|
? buildElementOption(queryBuilderState.executionContextState.mapping)
|
@@ -94,7 +92,8 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
94
92
|
(rt) =>
|
95
93
|
new RuntimePointer(PackageableElementExplicitReference.create(rt)),
|
96
94
|
)
|
97
|
-
.map(buildRuntimeValueOption)
|
95
|
+
.map(buildRuntimeValueOption)
|
96
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
98
97
|
const selectedRuntimeOption = queryBuilderState.executionContextState
|
99
98
|
.runtimeValue
|
100
99
|
? buildRuntimeValueOption(
|
@@ -125,79 +124,79 @@ const MappingQueryBuilderSetupPanelContent = observer(
|
|
125
124
|
: [];
|
126
125
|
|
127
126
|
return (
|
128
|
-
|
129
|
-
<
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
127
|
+
<div className="query-builder__setup__config-group">
|
128
|
+
<PanelHeader title="properties" />
|
129
|
+
<div className="query-builder__setup__config-group__content">
|
130
|
+
<div className="query-builder__setup__config-group__item">
|
131
|
+
<label
|
132
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
133
|
+
title="mapping"
|
134
|
+
htmlFor="query-builder__setup__mapping-selector"
|
135
|
+
>
|
136
|
+
Mapping
|
137
|
+
</label>
|
138
|
+
<CustomSelectorInput
|
139
|
+
inputId="query-builder__setup__mapping-selector"
|
140
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
141
|
+
placeholder={
|
142
|
+
mappingOptions.length
|
143
|
+
? 'Choose a mapping...'
|
144
|
+
: 'No mapping found'
|
145
|
+
}
|
146
|
+
noMatchMessage="No mapping found"
|
147
|
+
options={mappingOptions}
|
148
|
+
onChange={changeMapping}
|
149
|
+
value={selectedMappingOption}
|
150
|
+
darkMode={
|
151
|
+
!applicationStore.layoutService
|
152
|
+
.TEMPORARY__isLightColorThemeEnabled
|
153
|
+
}
|
154
|
+
filterOption={mappingFilterOption}
|
155
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
156
|
+
darkMode:
|
155
157
|
!applicationStore.layoutService
|
156
|
-
.TEMPORARY__isLightColorThemeEnabled
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
158
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
159
|
+
})}
|
160
|
+
/>
|
161
|
+
</div>
|
162
|
+
<div className="query-builder__setup__config-group__item">
|
163
|
+
<label
|
164
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
165
|
+
title="runtime"
|
166
|
+
htmlFor="query-builder__setup__runtime-selector"
|
167
|
+
>
|
168
|
+
Runtime
|
169
|
+
</label>
|
170
|
+
<CustomSelectorInput
|
171
|
+
inputId="query-builder__setup__runtime-selector"
|
172
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
173
|
+
placeholder="Choose a runtime..."
|
174
|
+
noMatchMessage="No compatible runtime found for specified mapping"
|
175
|
+
disabled={!queryBuilderState.executionContextState.mapping}
|
176
|
+
options={runtimeOptions}
|
177
|
+
onChange={changeRuntime}
|
178
|
+
value={selectedRuntimeOption}
|
179
|
+
darkMode={
|
180
|
+
!applicationStore.layoutService
|
181
|
+
.TEMPORARY__isLightColorThemeEnabled
|
182
|
+
}
|
183
|
+
filterOption={runtimeFilterOption}
|
184
|
+
formatOptionLabel={getRuntimeOptionFormatter({
|
185
|
+
darkMode:
|
182
186
|
!applicationStore.layoutService
|
183
|
-
.TEMPORARY__isLightColorThemeEnabled
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
187
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
188
|
+
})}
|
189
|
+
/>
|
190
|
+
</div>
|
191
|
+
<div className="query-builder__setup__config-group__item">
|
192
|
+
<QueryBuilderClassSelector
|
193
|
+
queryBuilderState={queryBuilderState}
|
194
|
+
classes={classes}
|
195
|
+
noMatchMessage="No compatible entity found for specified mapping"
|
196
|
+
/>
|
193
197
|
</div>
|
194
198
|
</div>
|
195
|
-
|
196
|
-
queryBuilderState={queryBuilderState}
|
197
|
-
classes={classes}
|
198
|
-
noMatchMessage="No compatible class found for specified mapping"
|
199
|
-
/>
|
200
|
-
</>
|
199
|
+
</div>
|
201
200
|
);
|
202
201
|
},
|
203
202
|
);
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { CustomSelectorInput,
|
17
|
+
import { CustomSelectorInput, PanelHeader } from '@finos/legend-art';
|
18
18
|
import { observer } from 'mobx-react-lite';
|
19
19
|
import { getMappingCompatibleClasses, type Service } from '@finos/legend-graph';
|
20
20
|
import { useApplicationStore } from '@finos/legend-application';
|
@@ -55,7 +55,9 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
55
55
|
|
56
56
|
// execution context
|
57
57
|
const serviceOptions =
|
58
|
-
queryBuilderState.usableServices
|
58
|
+
queryBuilderState.usableServices
|
59
|
+
?.map(buildElementOption)
|
60
|
+
.sort((a, b) => a.label.localeCompare(b.label)) ?? [];
|
59
61
|
const selectedServiceOption = buildElementOption(queryBuilderState.service);
|
60
62
|
const onServiceOptionChange = (
|
61
63
|
option: PackageableElementOption<Service>,
|
@@ -67,9 +69,9 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
67
69
|
};
|
68
70
|
|
69
71
|
// execution context
|
70
|
-
const executionContextOptions = queryBuilderState.executionContexts
|
71
|
-
buildExecutionContextOption
|
72
|
-
|
72
|
+
const executionContextOptions = queryBuilderState.executionContexts
|
73
|
+
.map(buildExecutionContextOption)
|
74
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
73
75
|
const selectedExecutionContextOption =
|
74
76
|
queryBuilderState.selectedExecutionContext
|
75
77
|
? buildExecutionContextOption(
|
@@ -96,75 +98,74 @@ const ServiceQueryBuilderSetupPanelContent = observer(
|
|
96
98
|
: [];
|
97
99
|
|
98
100
|
return (
|
99
|
-
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
<div className="query-builder__setup__config-group">
|
102
|
+
<PanelHeader title="properties" />
|
103
|
+
<div className="query-builder__setup__config-group__content">
|
104
|
+
<div className="query-builder__setup__config-group__item">
|
105
|
+
<label
|
106
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
107
|
+
title="service"
|
108
|
+
htmlFor="query-builder__setup__service-selector"
|
109
|
+
>
|
110
|
+
Service
|
111
|
+
</label>
|
112
|
+
<CustomSelectorInput
|
113
|
+
inputId="query-builder__setup__service-selector"
|
114
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
115
|
+
placeholder="Choose a service..."
|
116
|
+
options={serviceOptions}
|
117
|
+
disabled={
|
118
|
+
serviceOptions.length < 1 ||
|
119
|
+
(serviceOptions.length === 1 && Boolean(selectedServiceOption))
|
120
|
+
}
|
121
|
+
onChange={onServiceOptionChange}
|
122
|
+
value={selectedServiceOption}
|
123
|
+
darkMode={
|
124
|
+
!applicationStore.layoutService
|
125
|
+
.TEMPORARY__isLightColorThemeEnabled
|
126
|
+
}
|
127
|
+
/>
|
105
128
|
</div>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
129
|
+
{/* We will display mapping and runtime selector for single-execution and execution context for multi-execution */}
|
130
|
+
{Boolean(queryBuilderState.executionContexts.length) && (
|
131
|
+
<>
|
132
|
+
<div className="query-builder__setup__config-group__item">
|
133
|
+
<label
|
134
|
+
className="btn--sm query-builder__setup__config-group__item__label"
|
135
|
+
title="execution context"
|
136
|
+
htmlFor="query-builder__setup__context-selector"
|
137
|
+
>
|
138
|
+
Context
|
139
|
+
</label>
|
140
|
+
<CustomSelectorInput
|
141
|
+
inputId="query-builder__setup__context-selector"
|
142
|
+
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
143
|
+
placeholder="Choose an execution context..."
|
144
|
+
options={executionContextOptions}
|
145
|
+
disabled={
|
146
|
+
executionContextOptions.length < 1 ||
|
147
|
+
(executionContextOptions.length === 1 &&
|
148
|
+
Boolean(selectedExecutionContextOption))
|
149
|
+
}
|
150
|
+
onChange={onExecutionContextOptionChange}
|
151
|
+
value={selectedExecutionContextOption}
|
152
|
+
darkMode={
|
153
|
+
!applicationStore.layoutService
|
154
|
+
.TEMPORARY__isLightColorThemeEnabled
|
155
|
+
}
|
156
|
+
/>
|
113
157
|
</div>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
}
|
123
|
-
onChange={onServiceOptionChange}
|
124
|
-
value={selectedServiceOption}
|
125
|
-
darkMode={
|
126
|
-
!applicationStore.layoutService
|
127
|
-
.TEMPORARY__isLightColorThemeEnabled
|
128
|
-
}
|
129
|
-
/>
|
130
|
-
</div>
|
131
|
-
{/* We will display mapping and runtime selector for single-execution and execution context for multi-execution */}
|
132
|
-
{Boolean(queryBuilderState.executionContexts.length) && (
|
133
|
-
<>
|
134
|
-
<div className="query-builder__setup__config-group__item">
|
135
|
-
<div
|
136
|
-
className="btn--sm query-builder__setup__config-group__item__label"
|
137
|
-
title="execution context"
|
138
|
-
>
|
139
|
-
<PlayIcon className="query-builder__setup__service__icon__execution-context" />
|
140
|
-
</div>
|
141
|
-
<CustomSelectorInput
|
142
|
-
className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
|
143
|
-
placeholder="Choose an execution context..."
|
144
|
-
options={executionContextOptions}
|
145
|
-
disabled={
|
146
|
-
executionContextOptions.length < 1 ||
|
147
|
-
(executionContextOptions.length === 1 &&
|
148
|
-
Boolean(selectedExecutionContextOption))
|
149
|
-
}
|
150
|
-
onChange={onExecutionContextOptionChange}
|
151
|
-
value={selectedExecutionContextOption}
|
152
|
-
darkMode={
|
153
|
-
!applicationStore.layoutService
|
154
|
-
.TEMPORARY__isLightColorThemeEnabled
|
155
|
-
}
|
156
|
-
/>
|
157
|
-
</div>
|
158
|
-
</>
|
159
|
-
)}
|
158
|
+
</>
|
159
|
+
)}
|
160
|
+
<div className="query-builder__setup__config-group__item">
|
161
|
+
<QueryBuilderClassSelector
|
162
|
+
queryBuilderState={queryBuilderState}
|
163
|
+
classes={classes}
|
164
|
+
noMatchMessage="No compatible entity found for specified execution context"
|
165
|
+
/>
|
160
166
|
</div>
|
161
167
|
</div>
|
162
|
-
|
163
|
-
queryBuilderState={queryBuilderState}
|
164
|
-
classes={classes}
|
165
|
-
noMatchMessage="No compatible class found for specified execution context"
|
166
|
-
/>
|
167
|
-
</>
|
168
|
+
</div>
|
168
169
|
);
|
169
170
|
},
|
170
171
|
);
|
package/src/index.ts
CHANGED
@@ -21,6 +21,7 @@ export * from './__lib__/QueryBuilderEvent.js';
|
|
21
21
|
export { QueryBuilder_GraphManagerPreset } from './graph-manager/QueryBuilder_GraphManagerPreset.js';
|
22
22
|
export { QueryBuilderConfig } from './graph-manager/QueryBuilderConfig.js';
|
23
23
|
export { QUERY_BUILDER_TEST_ID } from './__lib__/QueryBuilderTesting.js';
|
24
|
+
export { dragAndDrop } from './components/__test-utils__/QueryBuilderComponentTestUtils.js';
|
24
25
|
export {
|
25
26
|
type CheckEntitlementEditorRender,
|
26
27
|
QueryBuilder_LegendApplicationPlugin,
|
@@ -29,8 +30,8 @@ export { QueryBuilderNavigationBlocker } from './components/QueryBuilderNavigati
|
|
29
30
|
export { QueryBuilder } from './components/QueryBuilder.js';
|
30
31
|
export { QUERY_BUILDER_COMPONENT_ELEMENT_ID } from './components/QueryBuilderComponentElement.js';
|
31
32
|
export {
|
32
|
-
QueryBuilderState,
|
33
33
|
type QuerySDLC,
|
34
|
+
QueryBuilderState,
|
34
35
|
} from './stores/QueryBuilderState.js';
|
35
36
|
export {
|
36
37
|
getTDSColumnDerivedProperyFromType,
|
@@ -131,6 +131,8 @@ export class QueryBuilderSimpleConstantExpressionState
|
|
131
131
|
this.queryBuilderState.graphManagerState.graph,
|
132
132
|
type,
|
133
133
|
this.queryBuilderState.observerContext,
|
134
|
+
this.queryBuilderState
|
135
|
+
.INTERNAL__enableInitializingDefaultSimpleExpressionValue,
|
134
136
|
);
|
135
137
|
this.setValueSpec(valSpec);
|
136
138
|
} catch (error) {
|