@finos/legend-query-builder 4.1.15 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/lib/components/filter/QueryBuilderFilterPanel.d.ts +6 -1
  2. package/lib/components/filter/QueryBuilderFilterPanel.d.ts.map +1 -1
  3. package/lib/components/filter/QueryBuilderFilterPanel.js +189 -13
  4. package/lib/components/filter/QueryBuilderFilterPanel.js.map +1 -1
  5. package/lib/index.css +1 -17
  6. package/lib/index.css.map +1 -1
  7. package/lib/package.json +1 -1
  8. package/lib/stores/QueryBuilderStateHashUtils.d.ts +1 -0
  9. package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
  10. package/lib/stores/QueryBuilderStateHashUtils.js +1 -0
  11. package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
  12. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  13. package/lib/stores/QueryBuilderValueSpecificationHelper.js +2 -3
  14. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  15. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts +1 -1
  16. package/lib/stores/filter/QueryBuilderFilterOperator.d.ts.map +1 -1
  17. package/lib/stores/filter/QueryBuilderFilterOperator.js.map +1 -1
  18. package/lib/stores/filter/QueryBuilderFilterState.d.ts +16 -5
  19. package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
  20. package/lib/stores/filter/QueryBuilderFilterState.js +78 -18
  21. package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
  22. package/lib/stores/filter/QueryBuilderFilterStateBuilder.d.ts.map +1 -1
  23. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js +125 -2
  24. package/lib/stores/filter/QueryBuilderFilterStateBuilder.js.map +1 -1
  25. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.d.ts.map +1 -1
  26. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +62 -3
  27. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
  28. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts +1 -1
  29. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.d.ts.map +1 -1
  30. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js +12 -192
  31. package/lib/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.js.map +1 -1
  32. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts +2 -2
  33. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  34. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +4 -4
  35. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  36. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts +2 -2
  37. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  38. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +4 -4
  39. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  40. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts +2 -2
  41. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  42. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +4 -4
  43. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  44. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts +1 -1
  45. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  46. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +2 -2
  47. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  48. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts +1 -1
  49. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  50. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +2 -2
  51. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  52. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts +2 -2
  53. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
  54. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +4 -4
  55. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
  56. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts +2 -2
  57. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
  58. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +4 -4
  59. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
  60. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts +1 -1
  61. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  62. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +2 -2
  63. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  64. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts +1 -1
  65. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  66. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +2 -2
  67. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  68. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts +2 -2
  69. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  70. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +4 -4
  71. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  72. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  73. package/lib/stores/shared/ValueSpecificationEditorHelper.js +9 -1
  74. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  75. package/package.json +3 -3
  76. package/src/components/filter/QueryBuilderFilterPanel.tsx +355 -24
  77. package/src/stores/QueryBuilderStateHashUtils.ts +1 -0
  78. package/src/stores/QueryBuilderValueSpecificationHelper.ts +2 -3
  79. package/src/stores/filter/QueryBuilderFilterOperator.ts +1 -0
  80. package/src/stores/filter/QueryBuilderFilterState.ts +115 -27
  81. package/src/stores/filter/QueryBuilderFilterStateBuilder.ts +244 -0
  82. package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +94 -1
  83. package/src/stores/filter/operators/QueryBuilderFilterOperatorValueSpecificationBuilder.ts +37 -377
  84. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +7 -1
  85. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +7 -1
  86. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +7 -1
  87. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +2 -0
  88. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +2 -0
  89. package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +7 -1
  90. package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +7 -1
  91. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +2 -0
  92. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +2 -0
  93. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +7 -1
  94. package/src/stores/shared/ValueSpecificationEditorHelper.ts +11 -1
@@ -98,10 +98,12 @@ export class QueryBuilderFilterOperator_StartWith
98
98
 
99
99
  buildFilterConditionExpression(
100
100
  filterConditionState: FilterConditionState,
101
+ lambdaParameterName?: string | undefined,
101
102
  ): ValueSpecification {
102
103
  return buildFilterConditionExpression(
103
104
  filterConditionState,
104
105
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.STARTS_WITH,
106
+ lambdaParameterName,
105
107
  );
106
108
  }
107
109
 
@@ -131,9 +133,13 @@ export class QueryBuilderFilterOperator_NotStartWith extends QueryBuilderFilterO
131
133
 
132
134
  override buildFilterConditionExpression(
133
135
  filterConditionState: FilterConditionState,
136
+ lambdaParameterName?: string | undefined,
134
137
  ): ValueSpecification {
135
138
  return buildNotExpression(
136
- super.buildFilterConditionExpression(filterConditionState),
139
+ super.buildFilterConditionExpression(
140
+ filterConditionState,
141
+ lambdaParameterName,
142
+ ),
137
143
  );
138
144
  }
139
145
 
@@ -224,7 +224,17 @@ export const generateVariableExpressionMockValue = (
224
224
  ): ValueSpecification | undefined => {
225
225
  const varType = parameter.genericType?.value.rawType;
226
226
  const multiplicity = parameter.multiplicity;
227
- if ((!multiplicity.upperBound || multiplicity.upperBound > 1) && varType) {
227
+ /**
228
+ * Studio doesn't handle byte[*] as a CollectionInstanceValue but as a
229
+ * PrimitiveValueSpecification of type PrimitiveType.BYTE.
230
+ * Engine sends a Base64String transformed from byte[] by Jackson to Studio, then
231
+ * Studio stores this Base64String as the value of V1_CByteArray.
232
+ */
233
+ if (
234
+ (!multiplicity.upperBound || multiplicity.upperBound > 1) &&
235
+ varType &&
236
+ varType !== PrimitiveType.BYTE
237
+ ) {
228
238
  return new CollectionInstanceValue(
229
239
  multiplicity,
230
240
  GenericTypeExplicitReference.create(new GenericType(varType)),