@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
@@ -19,6 +19,7 @@ import {
19
19
  BasePopover,
20
20
  BaseRadioGroup,
21
21
  CustomSelectorInput,
22
+ clsx,
22
23
  } from '@finos/legend-art';
23
24
  import {
24
25
  type PureModel,
@@ -733,11 +734,13 @@ export const buildDatePickerOption = (
733
734
  CUSTOM_DATE_PICKER_OPTION.LATEST_DATE,
734
735
  )
735
736
  : new DatePickerOption(
736
- valueSpecification.values[0] as string,
737
- valueSpecification.genericType.value.rawType.path ===
738
- PRIMITIVE_TYPE.DATETIME
739
- ? CUSTOM_DATE_PICKER_OPTION.ABSOLUTE_TIME
740
- : CUSTOM_DATE_PICKER_OPTION.ABSOLUTE_DATE,
737
+ (valueSpecification.values[0] ?? '') as string,
738
+ valueSpecification.values[0] === null
739
+ ? ''
740
+ : valueSpecification.genericType.value.rawType.path ===
741
+ PRIMITIVE_TYPE.DATETIME
742
+ ? CUSTOM_DATE_PICKER_OPTION.ABSOLUTE_TIME
743
+ : CUSTOM_DATE_PICKER_OPTION.ABSOLUTE_DATE,
741
744
  );
742
745
  }
743
746
  };
@@ -760,7 +763,7 @@ const AbsoluteDateValueSpecificationEditor: React.FC<{
760
763
  const absoluteDateValue =
761
764
  valueSpecification instanceof SimpleFunctionExpression
762
765
  ? ''
763
- : (valueSpecification.values[0] as string);
766
+ : (valueSpecification.values[0] as string | null);
764
767
  const updateAbsoluteDateValue: React.ChangeEventHandler<HTMLInputElement> = (
765
768
  event,
766
769
  ) => {
@@ -812,7 +815,7 @@ const AbsoluteDateValueSpecificationEditor: React.FC<{
812
815
  className="panel__content__form__section__input value-spec-editor__date-picker__absolute-date__input input--dark"
813
816
  type="date"
814
817
  spellCheck={false}
815
- value={absoluteDateValue}
818
+ value={absoluteDateValue ?? ''}
816
819
  onChange={updateAbsoluteDateValue}
817
820
  />
818
821
  </div>
@@ -837,7 +840,7 @@ const AbsoluteTimeValueSpecificationEditor: React.FC<{
837
840
  const absoluteTimeValue =
838
841
  valueSpecification instanceof SimpleFunctionExpression
839
842
  ? ''
840
- : (valueSpecification.values[0] as string);
843
+ : (valueSpecification.values[0] as string | null);
841
844
  const updateAbsoluteTimeValue: React.ChangeEventHandler<HTMLInputElement> = (
842
845
  event,
843
846
  ) => {
@@ -893,7 +896,7 @@ const AbsoluteTimeValueSpecificationEditor: React.FC<{
893
896
  // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#step
894
897
  step="1"
895
898
  spellCheck={false}
896
- value={absoluteTimeValue}
899
+ value={absoluteTimeValue ?? ''}
897
900
  onChange={updateAbsoluteTimeValue}
898
901
  />
899
902
  </div>
@@ -1225,6 +1228,7 @@ export const CustomDatePicker: React.FC<{
1225
1228
  valueSpecification: PrimitiveInstanceValue | SimpleFunctionExpression;
1226
1229
  graph: PureModel;
1227
1230
  observerContext: ObserverContext;
1231
+ hasError?: boolean;
1228
1232
  typeCheckOption: {
1229
1233
  expectedType: Type;
1230
1234
  /**
@@ -1247,6 +1251,7 @@ export const CustomDatePicker: React.FC<{
1247
1251
  setValueSpecification,
1248
1252
  graph,
1249
1253
  observerContext,
1254
+ hasError,
1250
1255
  typeCheckOption,
1251
1256
  } = props;
1252
1257
  const applicationStore = useApplicationStore();
@@ -1404,11 +1409,13 @@ export const CustomDatePicker: React.FC<{
1404
1409
  return (
1405
1410
  <>
1406
1411
  <button
1407
- className="value-spec-editor__date-picker__trigger"
1412
+ className={clsx('value-spec-editor__date-picker__trigger', {
1413
+ 'value-spec-editor__date-picker__trigger--error': hasError,
1414
+ })}
1408
1415
  title="Click to edit and pick from more date options"
1409
1416
  onClick={openCustomDatePickerPopover}
1410
1417
  >
1411
- {datePickerOption.label}
1418
+ {datePickerOption.label || 'Select value'}
1412
1419
  </button>
1413
1420
  <BasePopover
1414
1421
  open={Boolean(anchorEl)}
@@ -48,7 +48,7 @@ import { forwardRef, useState } from 'react';
48
48
 
49
49
  const CALCULATED = '(calculated)';
50
50
 
51
- const getNameOfValue = (
51
+ export const getNameOfValueSpecification = (
52
52
  value: ValueSpecification,
53
53
  queryBuilderState: QueryBuilderState,
54
54
  ): string | undefined => {
@@ -143,7 +143,7 @@ export const VariableViewer = observer(
143
143
  const onContextMenuClose = (): void => setIsSelectedFromContextMenu(false);
144
144
  const isConstant = Boolean(value);
145
145
  const constantValueString = value?.val
146
- ? getNameOfValue(value.val, queryBuilderState)
146
+ ? getNameOfValueSpecification(value.val, queryBuilderState)
147
147
  : undefined;
148
148
  const name = variable.name;
149
149
  const variableTypeName =
@@ -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
  );