@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.
Files changed (216) hide show
  1. package/lib/__lib__/QueryBuilderDocumentation.d.ts +2 -1
  2. package/lib/__lib__/QueryBuilderDocumentation.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderDocumentation.js +1 -0
  4. package/lib/__lib__/QueryBuilderDocumentation.js.map +1 -1
  5. package/lib/__lib__/QueryBuilderTesting.d.ts +1 -0
  6. package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
  7. package/lib/__lib__/QueryBuilderTesting.js +1 -0
  8. package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
  9. package/lib/components/QueryBuilder.d.ts.map +1 -1
  10. package/lib/components/QueryBuilder.js +55 -19
  11. package/lib/components/QueryBuilder.js.map +1 -1
  12. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  13. package/lib/components/QueryBuilderConstantExpressionPanel.js +30 -13
  14. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  16. package/lib/components/QueryBuilderPropertyExpressionEditor.js +2 -1
  17. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  18. package/lib/components/QueryBuilderSideBar.d.ts +0 -16
  19. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  20. package/lib/components/QueryBuilderSideBar.js +32 -104
  21. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  22. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  23. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +2 -1
  24. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  25. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  26. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +50 -5
  27. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  28. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  29. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +2 -1
  30. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  31. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  32. package/lib/components/filter/QueryBuilderFilterPanel.js +2 -1
  33. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  34. package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
  35. package/lib/components/result/QueryBuilderResultPanel.js +18 -6
  36. package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
  37. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  38. package/lib/components/shared/BasicValueSpecificationEditor.js +62 -28
  39. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  40. package/lib/components/shared/CustomDatePicker.d.ts +1 -0
  41. package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
  42. package/lib/components/shared/CustomDatePicker.js +13 -9
  43. package/lib/components/shared/CustomDatePicker.js.map +1 -1
  44. package/lib/components/shared/QueryBuilderVariableSelector.d.ts +1 -0
  45. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
  46. package/lib/components/shared/QueryBuilderVariableSelector.js +2 -2
  47. package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
  48. package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
  49. package/lib/components/workflows/ClassQueryBuilder.js +19 -16
  50. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  51. package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
  52. package/lib/components/workflows/MappingQueryBuilder.js +18 -15
  53. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  54. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  55. package/lib/components/workflows/ServiceQueryBuilder.js +13 -10
  56. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  57. package/lib/index.css +2 -2
  58. package/lib/index.css.map +1 -1
  59. package/lib/index.d.ts +2 -1
  60. package/lib/index.d.ts.map +1 -1
  61. package/lib/index.js +1 -0
  62. package/lib/index.js.map +1 -1
  63. package/lib/package.json +1 -1
  64. package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
  65. package/lib/stores/QueryBuilderConstantsState.js +2 -1
  66. package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
  67. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +1 -1
  68. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  69. package/lib/stores/QueryBuilderPropertyEditorState.js +12 -34
  70. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  71. package/lib/stores/QueryBuilderState.d.ts +3 -0
  72. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  73. package/lib/stores/QueryBuilderState.js +15 -1
  74. package/lib/stores/QueryBuilderState.js.map +1 -1
  75. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
  76. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  77. package/lib/stores/QueryBuilderValueSpecificationHelper.js +23 -1
  78. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  79. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +29 -0
  80. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
  81. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -0
  82. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  83. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +2 -0
  84. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  85. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -0
  86. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  87. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +6 -0
  88. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  89. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +2 -0
  90. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  91. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +15 -0
  92. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  93. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +3 -0
  94. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  95. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +42 -3
  96. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  97. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  98. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +6 -5
  99. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  100. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  101. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +6 -5
  102. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  103. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  104. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +8 -37
  105. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  106. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  107. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +7 -10
  108. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  109. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  110. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +7 -10
  111. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  112. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  113. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +6 -5
  114. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  115. package/lib/stores/filter/QueryBuilderFilterState.d.ts +3 -0
  116. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  117. package/lib/stores/filter/QueryBuilderFilterState.js +30 -2
  118. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  119. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  120. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +5 -4
  121. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  122. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  123. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +5 -4
  124. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  125. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  126. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +7 -35
  127. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  128. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  129. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +6 -8
  130. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  131. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  132. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +6 -8
  133. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  134. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  135. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +6 -8
  136. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  137. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  138. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +6 -8
  139. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  140. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  141. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +5 -4
  142. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  143. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts +5 -0
  144. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts.map +1 -1
  145. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js +7 -0
  146. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js.map +1 -1
  147. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -1
  148. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  149. package/lib/stores/shared/ValueSpecificationEditorHelper.js +20 -10
  150. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  151. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +0 -2
  152. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
  153. package/lib/stores/watermark/QueryBuilderWatermarkState.js +0 -6
  154. package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
  155. package/lib/stores/workflows/MappingQueryBuilderState.d.ts +2 -2
  156. package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -1
  157. package/lib/stores/workflows/MappingQueryBuilderState.js +2 -1
  158. package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
  159. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +2 -2
  160. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
  161. package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -1
  162. package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
  163. package/package.json +4 -4
  164. package/src/__lib__/QueryBuilderDocumentation.ts +1 -0
  165. package/src/__lib__/QueryBuilderTesting.ts +1 -0
  166. package/src/components/QueryBuilder.tsx +179 -54
  167. package/src/components/QueryBuilderConstantExpressionPanel.tsx +36 -14
  168. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +2 -0
  169. package/src/components/QueryBuilderSideBar.tsx +138 -339
  170. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +6 -1
  171. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +139 -1
  172. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +17 -0
  173. package/src/components/filter/QueryBuilderFilterPanel.tsx +6 -0
  174. package/src/components/result/QueryBuilderResultPanel.tsx +63 -6
  175. package/src/components/shared/BasicValueSpecificationEditor.tsx +96 -34
  176. package/src/components/shared/CustomDatePicker.tsx +18 -11
  177. package/src/components/shared/QueryBuilderVariableSelector.tsx +2 -2
  178. package/src/components/workflows/ClassQueryBuilder.tsx +79 -77
  179. package/src/components/workflows/MappingQueryBuilder.tsx +75 -76
  180. package/src/components/workflows/ServiceQueryBuilder.tsx +71 -70
  181. package/src/index.ts +2 -1
  182. package/src/stores/QueryBuilderConstantsState.ts +2 -0
  183. package/src/stores/QueryBuilderPropertyEditorState.ts +15 -53
  184. package/src/stores/QueryBuilderState.ts +23 -1
  185. package/src/stores/QueryBuilderValueSpecificationHelper.ts +32 -0
  186. package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +39 -0
  187. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
  188. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +8 -0
  189. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +32 -0
  190. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +59 -0
  191. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -5
  192. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +5 -5
  193. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +10 -69
  194. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +7 -18
  195. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +7 -18
  196. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +5 -5
  197. package/src/stores/filter/QueryBuilderFilterState.ts +48 -2
  198. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -5
  199. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -5
  200. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +10 -71
  201. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +6 -14
  202. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +6 -14
  203. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +6 -14
  204. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +6 -14
  205. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -5
  206. package/src/stores/query-workflow/QueryBuilderWorkFlowState.ts +10 -0
  207. package/src/stores/shared/ValueSpecificationEditorHelper.ts +32 -16
  208. package/src/stores/watermark/QueryBuilderWatermarkState.ts +0 -7
  209. package/src/stores/workflows/MappingQueryBuilderState.ts +7 -1
  210. package/src/stores/workflows/ServiceQueryBuilderState.ts +6 -1
  211. package/tsconfig.json +0 -1
  212. package/lib/components/watermark/QueryBuilderWatermark.d.ts +0 -22
  213. package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +0 -1
  214. package/lib/components/watermark/QueryBuilderWatermark.js +0 -83
  215. package/lib/components/watermark/QueryBuilderWatermark.js.map +0 -1
  216. 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
- ): string | React.ReactNode => {
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.map((_class) => ({
136
- value: _class,
137
- label: generateClassLabel(_class, queryBuilderState),
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-group__content">
160
- <div className="query-builder__setup__config-group__item ">
161
- <div
162
- className="btn--sm query-builder__setup__config-group__item__label"
163
- title="class"
164
- >
165
- <PURE_ClassIcon />
166
- </div>
167
- <CustomSelectorInput
168
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector query-builder__setup__config-group__item__selector__milestoned"
169
- placeholder={
170
- classOptions.length
171
- ? 'Choose a class...'
172
- : noMatchMessage ?? 'No class found'
173
- }
174
- disabled={
175
- classOptions.length < 1 ||
176
- (classOptions.length === 1 && Boolean(selectedClassOption))
177
- }
178
- noMatchMessage={noMatchMessage}
179
- options={classOptions}
180
- onChange={changeClass}
181
- value={selectedClassOption}
182
- darkMode={
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
- filterOption={elementFilterOption}
187
- formatOptionLabel={getPackageableElementOptionFormatter({
188
- darkMode:
189
- !applicationStore.layoutService
190
- .TEMPORARY__isLightColorThemeEnabled,
191
- })}
192
- />
193
- {queryBuilderState.isQuerySupported && (
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
- <PURE_ClassIcon />
266
- </div>
267
- <CustomSelectorInput
268
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector query-builder__setup__config-group__item__selector__milestoned"
269
- placeholder={
270
- classOptions.length
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
- {queryBuilderState.isQuerySupported && (
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
- queryBuilderState.graphManagerState.usableMappings.map(
459
- buildElementOption,
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
- <QueryBuilderClassSelector
516
- queryBuilderState={queryBuilderState}
517
- classes={classes}
518
- />
519
- <div className="query-builder__setup__config-group">
520
- <div className="query-builder__setup__config-group__header">
521
- <div className="query-builder__setup__config-group__header__title">
522
- execution context
523
- </div>
524
- </div>
525
- <div className="query-builder__setup__config-group__content">
526
- <div className="query-builder__setup__config-group__item">
527
- <div
528
- className="btn--sm query-builder__setup__config-group__item__label"
529
- title="mapping"
530
- >
531
- <PURE_MappingIcon />
532
- </div>
533
- <CustomSelectorInput
534
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
535
- placeholder={
536
- mappingOptions.length
537
- ? 'Choose a mapping...'
538
- : 'No mapping found'
539
- }
540
- disabled={
541
- queryBuilderState.isMappingReadOnly ||
542
- !queryBuilderState.class
543
- }
544
- options={mappingOptions}
545
- onChange={changeMapping}
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
- filterOption={mappingFilterOption}
552
- formatOptionLabel={getPackageableElementOptionFormatter({
553
- darkMode:
554
- !applicationStore.layoutService
555
- .TEMPORARY__isLightColorThemeEnabled,
556
- })}
557
- />
558
- </div>
559
- <div className="query-builder__setup__config-group__item">
560
- <div
561
- className="btn--sm query-builder__setup__config-group__item__label"
562
- title="runtime"
563
- >
564
- <PURE_RuntimeIcon />
565
- </div>
566
- <CustomSelectorInput
567
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
568
- placeholder={
569
- runtimeOptions.length
570
- ? 'Choose a runtime...'
571
- : 'No runtime found'
572
- }
573
- disabled={
574
- queryBuilderState.isRuntimeReadOnly ||
575
- !queryBuilderState.class ||
576
- !queryBuilderState.executionContextState.mapping
577
- }
578
- options={runtimeOptions}
579
- onChange={changeRuntime}
580
- value={selectedRuntimeOption}
581
- darkMode={
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
- filterOption={runtimeFilterOption}
586
- formatOptionLabel={getRuntimeOptionFormatter({
587
- darkMode:
588
- !applicationStore.layoutService
589
- .TEMPORARY__isLightColorThemeEnabled,
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}