@finos/legend-query-builder 4.9.3 → 4.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  2. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -5
  3. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  4. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts +1 -1
  5. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.d.ts.map +1 -1
  6. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js +2 -2
  7. package/lib/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.js.map +1 -1
  8. package/lib/index.css +0 -16
  9. package/lib/package.json +1 -1
  10. package/lib/stores/explorer/QueryBuilderExplorerState.d.ts.map +1 -1
  11. package/lib/stores/explorer/QueryBuilderExplorerState.js +26 -8
  12. package/lib/stores/explorer/QueryBuilderExplorerState.js.map +1 -1
  13. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.d.ts.map +1 -1
  14. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js +6 -0
  15. package/lib/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.js.map +1 -1
  16. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts +3 -3
  17. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.d.ts.map +1 -1
  18. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.js.map +1 -1
  19. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts +2 -2
  20. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.d.ts.map +1 -1
  21. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js +5 -4
  22. package/lib/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.js.map +1 -1
  23. package/package.json +3 -3
  24. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +18 -15
  25. package/src/graph-manager/protocol/pure/v1/V1_QueryValueSpecificationBuilderHelper.ts +3 -4
  26. package/src/stores/explorer/QueryBuilderExplorerState.ts +43 -13
  27. package/src/stores/fetch-structure/graph-fetch/QueryBuilderGraphFetchTreeUtil.ts +10 -0
  28. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregateCalendarFunction.ts +2 -3
  29. package/src/stores/fetch-structure/tds/aggregation/calendarFunctions/QueryBuilderAggregateCalendarFunctionValueSpecificationBuilder.ts +7 -6
@@ -23,7 +23,6 @@ import {
23
23
  AbstractPropertyExpression,
24
24
  INTERNAL__UnknownValueSpecification,
25
25
  LambdaFunctionInstanceValue,
26
- type PrimitiveInstanceValue,
27
26
  type SimpleFunctionExpression,
28
27
  type ValueSpecification,
29
28
  } from '@finos/legend-graph';
@@ -42,7 +41,7 @@ export abstract class QueryBuilderAggregateCalendarFunction
42
41
  {
43
42
  dateColumn?: AbstractPropertyExpression | undefined;
44
43
  calendarType!: QUERY_BUILDER_CALENDAR_TYPE;
45
- endDate!: PrimitiveInstanceValue;
44
+ endDate!: ValueSpecification;
46
45
  lambdaParameterName: string = DEFAULT_LAMBDA_VARIABLE_NAME;
47
46
 
48
47
  constructor() {
@@ -122,7 +121,7 @@ export abstract class QueryBuilderAggregateCalendarFunction
122
121
  this.calendarType = val;
123
122
  }
124
123
 
125
- setEndDate(val: PrimitiveInstanceValue): void {
124
+ setEndDate(val: ValueSpecification): void {
126
125
  this.endDate = val;
127
126
  }
128
127
 
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import {
18
- type ValueSpecification,
18
+ ValueSpecification,
19
19
  SimpleFunctionExpression,
20
20
  extractElementNameFromPath,
21
21
  matchFunctionName,
@@ -44,7 +44,7 @@ export const buildCalendarFunctionExpression = (
44
44
  calendarFunctionFullPath: string,
45
45
  dateColumn: AbstractPropertyExpression | undefined,
46
46
  calendarType: QUERY_BUILDER_CALENDAR_TYPE,
47
- endDate: PrimitiveInstanceValue,
47
+ endDate: ValueSpecification,
48
48
  targetColumn:
49
49
  | AbstractPropertyExpression
50
50
  | INTERNAL__UnknownValueSpecification,
@@ -165,15 +165,16 @@ export const updateAggregateColumnState = (
165
165
 
166
166
  const endDate = guaranteeType(
167
167
  expression.parametersValues[2],
168
- PrimitiveInstanceValue,
168
+ ValueSpecification,
169
169
  `Can't process ${extractElementNameFromPath(
170
170
  calendarFunctionFullPath,
171
171
  )}() expression: only support ${extractElementNameFromPath(
172
172
  calendarFunctionFullPath,
173
- )}() with third parameter as PrimitiveInstancevalue`,
173
+ )}() with third parameter as ValueSpecification`,
174
174
  );
175
175
  assertTrue(
176
- endDate.genericType.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
176
+ endDate.genericType?.value.rawType.name === PRIMITIVE_TYPE.STRICTDATE ||
177
+ endDate.genericType?.value.rawType.name === PRIMITIVE_TYPE.DATE ||
177
178
  dateColumn.func.value.genericType.value.rawType.name ===
178
179
  PRIMITIVE_TYPE.DATE,
179
180
 
@@ -181,7 +182,7 @@ export const updateAggregateColumnState = (
181
182
  calendarFunctionFullPath,
182
183
  )}() expression: only support ${extractElementNameFromPath(
183
184
  calendarFunctionFullPath,
184
- )}() with third parameter of type StrictDate`,
185
+ )}() with third parameter of type Date`,
185
186
  );
186
187
 
187
188
  calendarFunction.calendarType = calendarTypeParameter