@finos/legend-query-builder 4.14.41 → 4.14.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  2. package/lib/components/QueryBuilderParametersPanel.js +2 -20
  3. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  4. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderSideBar.js +14 -5
  6. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  7. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts +0 -5
  8. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  9. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +5 -10
  10. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  11. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  12. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +3 -35
  13. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  14. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  15. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +1 -19
  16. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  17. package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
  18. package/lib/components/result/QueryBuilderResultPanel.js +1 -2
  19. package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
  20. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  21. package/lib/components/shared/BasicValueSpecificationEditor.js +9 -7
  22. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  23. package/lib/components/shared/QueryBuilderVariableSelector.d.ts.map +1 -1
  24. package/lib/components/shared/QueryBuilderVariableSelector.js +1 -8
  25. package/lib/components/shared/QueryBuilderVariableSelector.js.map +1 -1
  26. package/lib/index.css +2 -2
  27. package/lib/index.css.map +1 -1
  28. package/lib/package.json +1 -1
  29. package/lib/stores/QueryBuilderPreviewDataHelper.d.ts.map +1 -1
  30. package/lib/stores/QueryBuilderPreviewDataHelper.js +2 -2
  31. package/lib/stores/QueryBuilderPreviewDataHelper.js.map +1 -1
  32. package/lib/stores/QueryBuilderPropertyEditorState.d.ts +0 -1
  33. package/lib/stores/QueryBuilderPropertyEditorState.d.ts.map +1 -1
  34. package/lib/stores/QueryBuilderPropertyEditorState.js +1 -2
  35. package/lib/stores/QueryBuilderPropertyEditorState.js.map +1 -1
  36. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  37. package/lib/stores/QueryBuilderState.js +0 -12
  38. package/lib/stores/QueryBuilderState.js.map +1 -1
  39. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +0 -1
  40. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  41. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +0 -8
  42. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  43. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts +1 -1
  44. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.d.ts.map +1 -1
  45. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js +12 -1
  46. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.js.map +1 -1
  47. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts +0 -1
  48. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.d.ts.map +1 -1
  49. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js +0 -16
  50. package/lib/stores/milestoning/QueryBuilderMilestoningHelper.js.map +1 -1
  51. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts +0 -3
  52. package/lib/stores/milestoning/QueryBuilderMilestoningState.d.ts.map +1 -1
  53. package/lib/stores/milestoning/QueryBuilderMilestoningState.js +3 -49
  54. package/lib/stores/milestoning/QueryBuilderMilestoningState.js.map +1 -1
  55. package/package.json +1 -1
  56. package/src/components/QueryBuilderParametersPanel.tsx +0 -55
  57. package/src/components/QueryBuilderSideBar.tsx +35 -0
  58. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +46 -60
  59. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -53
  60. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +19 -132
  61. package/src/components/result/QueryBuilderResultPanel.tsx +1 -9
  62. package/src/components/shared/BasicValueSpecificationEditor.tsx +29 -18
  63. package/src/components/shared/QueryBuilderVariableSelector.tsx +0 -22
  64. package/src/stores/QueryBuilderPreviewDataHelper.ts +2 -1
  65. package/src/stores/QueryBuilderPropertyEditorState.ts +1 -2
  66. package/src/stores/QueryBuilderState.ts +0 -14
  67. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +0 -11
  68. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderAggregationState.ts +26 -1
  69. package/src/stores/milestoning/QueryBuilderMilestoningHelper.ts +0 -24
  70. package/src/stores/milestoning/QueryBuilderMilestoningState.ts +7 -65
@@ -75,7 +75,7 @@ export class QueryBuilderMilestoningState implements Hashable {
75
75
  startDate: observable,
76
76
  endDate: observable,
77
77
  showMilestoningEditor: observable,
78
-
78
+ isMilestonedQuery: computed,
79
79
  setProcessingDate: action,
80
80
  setBusinessDate: action,
81
81
  setStartDate: action,
@@ -87,10 +87,6 @@ export class QueryBuilderMilestoningState implements Hashable {
87
87
  initializeAllVersionsInRangeParameters: action,
88
88
  clearAllVersionsInRangeParameters: action,
89
89
  clearGetAllParameters: action,
90
-
91
- isAllVersionsEnabled: computed,
92
- isAllVersionsInRangeEnabled: computed,
93
- isMilestonedQuery: computed,
94
90
  hashCode: computed,
95
91
  });
96
92
 
@@ -384,9 +380,9 @@ export class QueryBuilderMilestoningState implements Hashable {
384
380
  this.queryBuilderState.parametersState.parameterStates.find(
385
381
  (p) => p.parameter === this.startDate,
386
382
  );
387
- if (paramState) {
388
- this.queryBuilderState.parametersState.removeParameter(paramState);
389
- }
383
+ this.queryBuilderState.parametersState.removeParameter(
384
+ guaranteeNonNullable(paramState),
385
+ );
390
386
  }
391
387
  if (
392
388
  this.endDate instanceof VariableExpression &&
@@ -398,9 +394,9 @@ export class QueryBuilderMilestoningState implements Hashable {
398
394
  this.queryBuilderState.parametersState.parameterStates.find(
399
395
  (p) => p.parameter === this.endDate,
400
396
  );
401
- if (paramState) {
402
- this.queryBuilderState.parametersState.removeParameter(paramState);
403
- }
397
+ this.queryBuilderState.parametersState.removeParameter(
398
+ guaranteeNonNullable(paramState),
399
+ );
404
400
  }
405
401
  this.setStartDate(undefined);
406
402
  this.setEndDate(undefined);
@@ -451,33 +447,6 @@ export class QueryBuilderMilestoningState implements Hashable {
451
447
  return milestoningParameter;
452
448
  }
453
449
 
454
- updateMilestoningParameterValue(
455
- parameter: VariableExpression,
456
- value: ValueSpecification | undefined,
457
- ): void {
458
- const variableState =
459
- this.queryBuilderState.parametersState.parameterStates.find(
460
- (param) => param.parameter.name === parameter.name,
461
- );
462
- if (variableState) {
463
- variableState.setValue(value);
464
- }
465
- }
466
-
467
- getMilestoningParameterValue(
468
- milestoningParameter: ValueSpecification,
469
- ): ValueSpecification | undefined {
470
- let value: ValueSpecification | undefined = milestoningParameter;
471
- if (milestoningParameter instanceof VariableExpression) {
472
- const paramState =
473
- this.queryBuilderState.parametersState.parameterStates.find(
474
- (param) => param.parameter.name === milestoningParameter.name,
475
- );
476
- value = paramState?.value;
477
- }
478
- return value;
479
- }
480
-
481
450
  isVariableUsed(variable: VariableExpression): boolean {
482
451
  const usedInBusiness = this.businessDate
483
452
  ? isValueExpressionReferencedInValue(variable, this.businessDate)
@@ -488,33 +457,6 @@ export class QueryBuilderMilestoningState implements Hashable {
488
457
  return usedInBusiness || usedInProcessingDate;
489
458
  }
490
459
 
491
- isMilestoningParameter(parameter: VariableExpression): boolean {
492
- let isMilestoningParameter = false;
493
- if (this.businessDate instanceof VariableExpression) {
494
- isMilestoningParameter =
495
- parameter.name ===
496
- guaranteeType(this.businessDate, VariableExpression).name;
497
- }
498
- if (this.processingDate instanceof VariableExpression) {
499
- isMilestoningParameter =
500
- isMilestoningParameter ||
501
- parameter.name ===
502
- guaranteeType(this.processingDate, VariableExpression).name;
503
- }
504
- if (this.startDate instanceof VariableExpression) {
505
- isMilestoningParameter =
506
- isMilestoningParameter ||
507
- parameter.name ===
508
- guaranteeType(this.startDate, VariableExpression).name;
509
- }
510
- if (this.endDate instanceof VariableExpression) {
511
- isMilestoningParameter =
512
- isMilestoningParameter ||
513
- parameter.name === guaranteeType(this.endDate, VariableExpression).name;
514
- }
515
- return isMilestoningParameter;
516
- }
517
-
518
460
  get hashCode(): string {
519
461
  return hashArray([
520
462
  QUERY_BUILDER_STATE_HASH_STRUCTURE.MILESTONING_STATE,