@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.
Files changed (207) hide show
  1. package/lib/__lib__/QueryBuilderTesting.d.ts +1 -0
  2. package/lib/__lib__/QueryBuilderTesting.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderTesting.js +1 -0
  4. package/lib/__lib__/QueryBuilderTesting.js.map +1 -1
  5. package/lib/components/QueryBuilder.d.ts.map +1 -1
  6. package/lib/components/QueryBuilder.js +37 -17
  7. package/lib/components/QueryBuilder.js.map +1 -1
  8. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  9. package/lib/components/QueryBuilderConstantExpressionPanel.js +30 -13
  10. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  11. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  12. package/lib/components/QueryBuilderPropertyExpressionEditor.js +2 -1
  13. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  14. package/lib/components/QueryBuilderSideBar.d.ts +0 -16
  15. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  16. package/lib/components/QueryBuilderSideBar.js +32 -104
  17. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  18. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.d.ts.map +1 -1
  19. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js +2 -1
  20. package/lib/components/fetch-structure/QueryBuilderPostFilterPanel.js.map +1 -1
  21. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  22. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +50 -5
  23. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  24. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  25. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +2 -1
  26. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  27. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  28. package/lib/components/filter/QueryBuilderFilterPanel.js +2 -1
  29. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  30. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  31. package/lib/components/shared/BasicValueSpecificationEditor.js +62 -28
  32. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  33. package/lib/components/shared/CustomDatePicker.d.ts +1 -0
  34. package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
  35. package/lib/components/shared/CustomDatePicker.js +13 -9
  36. package/lib/components/shared/CustomDatePicker.js.map +1 -1
  37. package/lib/components/shared/QueryBuilderVariableSelector.d.ts +1 -0
  38. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
  39. package/lib/components/shared/QueryBuilderVariableSelector.js +2 -2
  40. package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
  41. package/lib/components/workflows/ClassQueryBuilder.d.ts.map +1 -1
  42. package/lib/components/workflows/ClassQueryBuilder.js +19 -16
  43. package/lib/components/workflows/ClassQueryBuilder.js.map +1 -1
  44. package/lib/components/workflows/MappingQueryBuilder.d.ts.map +1 -1
  45. package/lib/components/workflows/MappingQueryBuilder.js +18 -15
  46. package/lib/components/workflows/MappingQueryBuilder.js.map +1 -1
  47. package/lib/components/workflows/ServiceQueryBuilder.d.ts.map +1 -1
  48. package/lib/components/workflows/ServiceQueryBuilder.js +13 -10
  49. package/lib/components/workflows/ServiceQueryBuilder.js.map +1 -1
  50. package/lib/index.css +2 -2
  51. package/lib/index.css.map +1 -1
  52. package/lib/index.d.ts +2 -1
  53. package/lib/index.d.ts.map +1 -1
  54. package/lib/index.js +1 -0
  55. package/lib/index.js.map +1 -1
  56. package/lib/package.json +1 -1
  57. package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
  58. package/lib/stores/QueryBuilderConstantsState.js +2 -1
  59. package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
  60. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +1 -1
  61. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  62. package/lib/stores/QueryBuilderPropertyEditorState.js +12 -34
  63. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  64. package/lib/stores/QueryBuilderState.d.ts +3 -0
  65. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  66. package/lib/stores/QueryBuilderState.js +15 -1
  67. package/lib/stores/QueryBuilderState.js.map +1 -1
  68. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +2 -1
  69. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  70. package/lib/stores/QueryBuilderValueSpecificationHelper.js +23 -1
  71. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  72. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +13 -0
  73. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
  74. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts +2 -0
  75. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.d.ts.map +1 -1
  76. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js +2 -0
  77. package/lib/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.js.map +1 -1
  78. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts +2 -0
  79. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.d.ts.map +1 -1
  80. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js +6 -0
  81. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.js.map +1 -1
  82. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +2 -0
  83. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  84. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +15 -0
  85. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  86. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts +3 -0
  87. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.d.ts.map +1 -1
  88. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js +42 -3
  89. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.js.map +1 -1
  90. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  91. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +6 -5
  92. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  93. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  94. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +6 -5
  95. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  96. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  97. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +8 -37
  98. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  99. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  100. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +7 -10
  101. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  102. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  103. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +7 -10
  104. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  105. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  106. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +6 -5
  107. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  108. package/lib/stores/filter/QueryBuilderFilterState.d.ts +3 -0
  109. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  110. package/lib/stores/filter/QueryBuilderFilterState.js +30 -2
  111. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  112. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  113. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +5 -4
  114. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  115. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  116. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +5 -4
  117. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  118. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  119. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +7 -35
  120. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  121. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  122. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +6 -8
  123. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  124. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  125. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +6 -8
  126. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  127. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  128. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +6 -8
  129. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  130. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  131. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +6 -8
  132. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  133. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  134. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +5 -4
  135. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  136. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts +5 -0
  137. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts.map +1 -1
  138. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js +7 -0
  139. package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js.map +1 -1
  140. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +1 -1
  141. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  142. package/lib/stores/shared/ValueSpecificationEditorHelper.js +20 -10
  143. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  144. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +0 -2
  145. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
  146. package/lib/stores/watermark/QueryBuilderWatermarkState.js +0 -6
  147. package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
  148. package/lib/stores/workflows/MappingQueryBuilderState.d.ts +2 -2
  149. package/lib/stores/workflows/MappingQueryBuilderState.d.ts.map +1 -1
  150. package/lib/stores/workflows/MappingQueryBuilderState.js +2 -1
  151. package/lib/stores/workflows/MappingQueryBuilderState.js.map +1 -1
  152. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts +2 -2
  153. package/lib/stores/workflows/ServiceQueryBuilderState.d.ts.map +1 -1
  154. package/lib/stores/workflows/ServiceQueryBuilderState.js +2 -1
  155. package/lib/stores/workflows/ServiceQueryBuilderState.js.map +1 -1
  156. package/package.json +4 -4
  157. package/src/__lib__/QueryBuilderTesting.ts +1 -0
  158. package/src/components/QueryBuilder.tsx +89 -46
  159. package/src/components/QueryBuilderConstantExpressionPanel.tsx +36 -14
  160. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +2 -0
  161. package/src/components/QueryBuilderSideBar.tsx +138 -339
  162. package/src/components/fetch-structure/QueryBuilderPostFilterPanel.tsx +6 -1
  163. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +139 -1
  164. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +17 -0
  165. package/src/components/filter/QueryBuilderFilterPanel.tsx +6 -0
  166. package/src/components/shared/BasicValueSpecificationEditor.tsx +96 -34
  167. package/src/components/shared/CustomDatePicker.tsx +18 -11
  168. package/src/components/shared/QueryBuilderVariableSelector.tsx +2 -2
  169. package/src/components/workflows/ClassQueryBuilder.tsx +79 -77
  170. package/src/components/workflows/MappingQueryBuilder.tsx +75 -76
  171. package/src/components/workflows/ServiceQueryBuilder.tsx +71 -70
  172. package/src/index.ts +2 -1
  173. package/src/stores/QueryBuilderConstantsState.ts +2 -0
  174. package/src/stores/QueryBuilderPropertyEditorState.ts +15 -53
  175. package/src/stores/QueryBuilderState.ts +23 -1
  176. package/src/stores/QueryBuilderValueSpecificationHelper.ts +32 -0
  177. package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +18 -0
  178. package/src/stores/fetch-structure/QueryBuilderFetchStructureImplementationState.ts +4 -0
  179. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeState.ts +8 -0
  180. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +32 -0
  181. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterState.ts +59 -0
  182. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -5
  183. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +5 -5
  184. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +10 -69
  185. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +7 -18
  186. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +7 -18
  187. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +5 -5
  188. package/src/stores/filter/QueryBuilderFilterState.ts +48 -2
  189. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +5 -5
  190. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +5 -5
  191. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +10 -71
  192. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +6 -14
  193. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +6 -14
  194. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +6 -14
  195. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +6 -14
  196. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +5 -5
  197. package/src/stores/query-workflow/QueryBuilderWorkFlowState.ts +10 -0
  198. package/src/stores/shared/ValueSpecificationEditorHelper.ts +32 -16
  199. package/src/stores/watermark/QueryBuilderWatermarkState.ts +0 -7
  200. package/src/stores/workflows/MappingQueryBuilderState.ts +7 -1
  201. package/src/stores/workflows/ServiceQueryBuilderState.ts +6 -1
  202. package/tsconfig.json +0 -1
  203. package/lib/components/watermark/QueryBuilderWatermark.d.ts +0 -22
  204. package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +0 -1
  205. package/lib/components/watermark/QueryBuilderWatermark.js +0 -83
  206. package/lib/components/watermark/QueryBuilderWatermark.js.map +0 -1
  207. 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
- ).map(buildElementOption);
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
- <QueryBuilderClassSelector
133
- queryBuilderState={queryBuilderState}
134
- classes={classes}
135
- onClassChange={onClassChange}
136
- />
137
- <div className="query-builder__setup__config-group">
138
- <div className="query-builder__setup__config-group__header">
139
- <div className="query-builder__setup__config-group__header__title">
140
- execution context
141
- </div>
142
- </div>
143
- <div className="query-builder__setup__config-group__content">
144
- <div className="query-builder__setup__config-group__item">
145
- <div
146
- className="btn--sm query-builder__setup__config-group__item__label"
147
- title="mapping"
148
- >
149
- <PURE_MappingIcon />
150
- </div>
151
- <CustomSelectorInput
152
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
153
- placeholder={
154
- mappingOptions.length
155
- ? 'Choose a mapping...'
156
- : 'No compatible mapping found for class'
157
- }
158
- noMatchMessage="No compatible mapping found for specified class"
159
- disabled={!queryBuilderState.class}
160
- options={mappingOptions}
161
- onChange={changeMapping}
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
- filterOption={mappingFilterOption}
168
- formatOptionLabel={getPackageableElementOptionFormatter({
169
- darkMode:
170
- !applicationStore.layoutService
171
- .TEMPORARY__isLightColorThemeEnabled,
172
- })}
173
- />
174
- </div>
175
- <div className="query-builder__setup__config-group__item">
176
- <div
177
- className="btn--sm query-builder__setup__config-group__item__label"
178
- title="runtime"
179
- >
180
- <PURE_RuntimeIcon />
181
- </div>
182
- <CustomSelectorInput
183
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
184
- placeholder="Choose a runtime..."
185
- noMatchMessage="No compatible runtime found for specified mapping"
186
- disabled={
187
- !queryBuilderState.class ||
188
- !queryBuilderState.executionContextState.mapping
189
- }
190
- options={runtimeOptions}
191
- onChange={changeRuntime}
192
- value={selectedRuntimeOption}
193
- darkMode={
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
- filterOption={runtimeFilterOption}
198
- formatOptionLabel={getRuntimeOptionFormatter({
199
- darkMode:
200
- !applicationStore.layoutService
201
- .TEMPORARY__isLightColorThemeEnabled,
202
- })}
203
- />
204
- </div>
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
- queryBuilderState.graphManagerState.usableMappings.map(
63
- buildElementOption,
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
- <div className="query-builder__setup__config-group">
130
- <div className="query-builder__setup__config-group__header">
131
- <div className="query-builder__setup__config-group__header__title">
132
- execution context
133
- </div>
134
- </div>
135
- <div className="query-builder__setup__config-group__content">
136
- <div className="query-builder__setup__config-group__item">
137
- <div
138
- className="btn--sm query-builder__setup__config-group__item__label"
139
- title="mapping"
140
- >
141
- <PURE_MappingIcon />
142
- </div>
143
- <CustomSelectorInput
144
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
145
- placeholder={
146
- mappingOptions.length
147
- ? 'Choose a mapping...'
148
- : 'No mapping found'
149
- }
150
- noMatchMessage="No mapping found"
151
- options={mappingOptions}
152
- onChange={changeMapping}
153
- value={selectedMappingOption}
154
- darkMode={
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
- filterOption={mappingFilterOption}
159
- formatOptionLabel={getPackageableElementOptionFormatter({
160
- darkMode:
161
- !applicationStore.layoutService
162
- .TEMPORARY__isLightColorThemeEnabled,
163
- })}
164
- />
165
- </div>
166
- <div className="query-builder__setup__config-group__item">
167
- <div
168
- className="btn--sm query-builder__setup__config-group__item__label"
169
- title="runtime"
170
- >
171
- <PURE_RuntimeIcon />
172
- </div>
173
- <CustomSelectorInput
174
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
175
- placeholder="Choose a runtime..."
176
- noMatchMessage="No compatible runtime found for specified mapping"
177
- disabled={!queryBuilderState.executionContextState.mapping}
178
- options={runtimeOptions}
179
- onChange={changeRuntime}
180
- value={selectedRuntimeOption}
181
- darkMode={
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
- filterOption={runtimeFilterOption}
186
- formatOptionLabel={getRuntimeOptionFormatter({
187
- darkMode:
188
- !applicationStore.layoutService
189
- .TEMPORARY__isLightColorThemeEnabled,
190
- })}
191
- />
192
- </div>
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
- <QueryBuilderClassSelector
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, PlayIcon, RobotIcon } from '@finos/legend-art';
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?.map(buildElementOption) ?? [];
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.map(
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
- <div className="query-builder__setup__config-group">
101
- <div className="query-builder__setup__config-group__header">
102
- <div className="query-builder__setup__config-group__header__title">
103
- service execution context
104
- </div>
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
- <div className="query-builder__setup__config-group__content">
107
- <div className="query-builder__setup__config-group__item">
108
- <div
109
- className="btn--sm query-builder__setup__config-group__item__label"
110
- title="service"
111
- >
112
- <RobotIcon className="query-builder__setup__service__icon__service" />
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
- <CustomSelectorInput
115
- className="panel__content__form__section__dropdown query-builder__setup__config-group__item__selector"
116
- placeholder="Choose a service..."
117
- options={serviceOptions}
118
- disabled={
119
- serviceOptions.length < 1 ||
120
- (serviceOptions.length === 1 &&
121
- Boolean(selectedServiceOption))
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
- <QueryBuilderClassSelector
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) {