@finos/legend-query-builder 4.17.97 → 4.17.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  2. package/lib/components/explorer/QueryBuilderExplorerPanel.js +13 -11
  3. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  4. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.d.ts.map +1 -1
  5. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js +13 -11
  6. package/lib/components/fetch-structure/QueryBuilderTDSComponentHelper.js.map +1 -1
  7. package/lib/data-access-overview.css +1 -1
  8. package/lib/index.css +1 -1
  9. package/lib/package.json +1 -1
  10. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +7 -0
  11. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  12. package/lib/stores/QueryBuilderValueSpecificationHelper.js +31 -13
  13. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  14. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.d.ts.map +1 -1
  15. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js +6 -4
  16. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.js.map +1 -1
  17. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.d.ts.map +1 -1
  18. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js +6 -4
  19. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.js.map +1 -1
  20. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.d.ts.map +1 -1
  21. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js +14 -12
  22. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.js.map +1 -1
  23. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.d.ts.map +1 -1
  24. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js +12 -10
  25. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.js.map +1 -1
  26. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.d.ts.map +1 -1
  27. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js +10 -8
  28. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.js.map +1 -1
  29. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.d.ts.map +1 -1
  30. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js +4 -2
  31. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.js.map +1 -1
  32. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.d.ts.map +1 -1
  33. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js +12 -10
  34. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.js.map +1 -1
  35. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.d.ts.map +1 -1
  36. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js +6 -4
  37. package/lib/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.js.map +1 -1
  38. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.d.ts.map +1 -1
  39. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js +6 -6
  40. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Contain.js.map +1 -1
  41. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.d.ts.map +1 -1
  42. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js +6 -6
  43. package/lib/stores/filter/operators/QueryBuilderFilterOperator_EndWith.js.map +1 -1
  44. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.d.ts.map +1 -1
  45. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js +14 -12
  46. package/lib/stores/filter/operators/QueryBuilderFilterOperator_Equal.js.map +1 -1
  47. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.d.ts.map +1 -1
  48. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js +12 -10
  49. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.js.map +1 -1
  50. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.d.ts.map +1 -1
  51. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js +12 -10
  52. package/lib/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.js.map +1 -1
  53. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.d.ts.map +1 -1
  54. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js +17 -13
  55. package/lib/stores/filter/operators/QueryBuilderFilterOperator_In.js.map +1 -1
  56. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.d.ts.map +1 -1
  57. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js +3 -2
  58. package/lib/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.js.map +1 -1
  59. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.d.ts.map +1 -1
  60. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js +12 -10
  61. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThan.js.map +1 -1
  62. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.d.ts.map +1 -1
  63. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js +12 -10
  64. package/lib/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.js.map +1 -1
  65. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.d.ts.map +1 -1
  66. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js +6 -6
  67. package/lib/stores/filter/operators/QueryBuilderFilterOperator_StartWith.js.map +1 -1
  68. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  69. package/lib/stores/shared/ValueSpecificationEditorHelper.js +3 -2
  70. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  71. package/package.json +6 -6
  72. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +13 -10
  73. package/src/components/fetch-structure/QueryBuilderTDSComponentHelper.tsx +13 -10
  74. package/src/stores/QueryBuilderValueSpecificationHelper.ts +35 -10
  75. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Contain.ts +5 -3
  76. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_EndWith.ts +5 -3
  77. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_Equal.ts +16 -13
  78. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_GreaterThan.ts +18 -11
  79. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_In.ts +12 -9
  80. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_IsEmpty.ts +6 -1
  81. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_LessThan.ts +18 -11
  82. package/src/stores/fetch-structure/tds/post-filter/operators/QueryBuilderPostFilterOperator_StartWith.ts +5 -3
  83. package/src/stores/filter/operators/QueryBuilderFilterOperator_Contain.ts +9 -5
  84. package/src/stores/filter/operators/QueryBuilderFilterOperator_EndWith.ts +9 -5
  85. package/src/stores/filter/operators/QueryBuilderFilterOperator_Equal.ts +16 -13
  86. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThan.ts +18 -11
  87. package/src/stores/filter/operators/QueryBuilderFilterOperator_GreaterThanEqual.ts +18 -11
  88. package/src/stores/filter/operators/QueryBuilderFilterOperator_In.ts +23 -14
  89. package/src/stores/filter/operators/QueryBuilderFilterOperator_IsEmpty.ts +3 -1
  90. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThan.ts +18 -11
  91. package/src/stores/filter/operators/QueryBuilderFilterOperator_LessThanEqual.ts +18 -11
  92. package/src/stores/filter/operators/QueryBuilderFilterOperator_StartWith.ts +9 -5
  93. package/src/stores/shared/ValueSpecificationEditorHelper.ts +6 -2
@@ -24,6 +24,7 @@ import {
24
24
  type SimpleFunctionExpression,
25
25
  Enumeration,
26
26
  PrimitiveType,
27
+ PrecisePrimitiveType,
27
28
  } from '@finos/legend-graph';
28
29
  import {
29
30
  buildFilterConditionState,
@@ -62,7 +63,8 @@ export class QueryBuilderFilterOperator_IsEmpty
62
63
  }
63
64
  return (
64
65
  propertyType instanceof Enumeration ||
65
- propertyType instanceof PrimitiveType
66
+ propertyType instanceof PrimitiveType ||
67
+ propertyType instanceof PrecisePrimitiveType
66
68
  );
67
69
  }
68
70
 
@@ -35,7 +35,10 @@ import {
35
35
  buildFilterConditionExpression,
36
36
  } from './QueryBuilderFilterOperatorValueSpecificationBuilder.js';
37
37
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graph/QueryBuilderMetaModelConst.js';
38
- import { isTypeCompatibleForAssignment } from '../../QueryBuilderValueSpecificationHelper.js';
38
+ import {
39
+ getStandardPrimitiveTypeEquivalent,
40
+ isTypeCompatibleForAssignment,
41
+ } from '../../QueryBuilderValueSpecificationHelper.js';
39
42
  import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../QueryBuilderStateHashUtils.js';
40
43
  import { buildDefaultInstanceValue } from '../../shared/ValueSpecificationEditorHelper.js';
41
44
 
@@ -53,17 +56,21 @@ export class QueryBuilderFilterOperator_LessThan
53
56
  const propertyType =
54
57
  filterConditionState.propertyExpressionState.propertyExpression.func.value
55
58
  .genericType.value.rawType;
59
+ const normalizedType = getStandardPrimitiveTypeEquivalent(propertyType);
56
60
  return (
57
- [
58
- PRIMITIVE_TYPE.NUMBER,
59
- PRIMITIVE_TYPE.INTEGER,
60
- PRIMITIVE_TYPE.DECIMAL,
61
- PRIMITIVE_TYPE.FLOAT,
62
- PRIMITIVE_TYPE.DATE,
63
- PRIMITIVE_TYPE.STRICTDATE,
64
- PRIMITIVE_TYPE.DATETIME,
65
- ] as string[]
66
- ).includes(propertyType.path);
61
+ normalizedType !== undefined &&
62
+ (
63
+ [
64
+ PRIMITIVE_TYPE.NUMBER,
65
+ PRIMITIVE_TYPE.INTEGER,
66
+ PRIMITIVE_TYPE.DECIMAL,
67
+ PRIMITIVE_TYPE.FLOAT,
68
+ PRIMITIVE_TYPE.DATE,
69
+ PRIMITIVE_TYPE.STRICTDATE,
70
+ PRIMITIVE_TYPE.DATETIME,
71
+ ] as string[]
72
+ ).includes(normalizedType)
73
+ );
67
74
  }
68
75
 
69
76
  isCompatibleWithFilterConditionValue(
@@ -35,7 +35,10 @@ import {
35
35
  buildFilterConditionExpression,
36
36
  } from './QueryBuilderFilterOperatorValueSpecificationBuilder.js';
37
37
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graph/QueryBuilderMetaModelConst.js';
38
- import { isTypeCompatibleForAssignment } from '../../QueryBuilderValueSpecificationHelper.js';
38
+ import {
39
+ getStandardPrimitiveTypeEquivalent,
40
+ isTypeCompatibleForAssignment,
41
+ } from '../../QueryBuilderValueSpecificationHelper.js';
39
42
  import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../QueryBuilderStateHashUtils.js';
40
43
  import { buildDefaultInstanceValue } from '../../shared/ValueSpecificationEditorHelper.js';
41
44
 
@@ -53,17 +56,21 @@ export class QueryBuilderFilterOperator_LessThanEqual
53
56
  const propertyType =
54
57
  filterConditionState.propertyExpressionState.propertyExpression.func.value
55
58
  .genericType.value.rawType;
59
+ const normalizedType = getStandardPrimitiveTypeEquivalent(propertyType);
56
60
  return (
57
- [
58
- PRIMITIVE_TYPE.NUMBER,
59
- PRIMITIVE_TYPE.INTEGER,
60
- PRIMITIVE_TYPE.DECIMAL,
61
- PRIMITIVE_TYPE.FLOAT,
62
- PRIMITIVE_TYPE.DATE,
63
- PRIMITIVE_TYPE.STRICTDATE,
64
- PRIMITIVE_TYPE.DATETIME,
65
- ] as string[]
66
- ).includes(propertyType.path);
61
+ normalizedType !== undefined &&
62
+ (
63
+ [
64
+ PRIMITIVE_TYPE.NUMBER,
65
+ PRIMITIVE_TYPE.INTEGER,
66
+ PRIMITIVE_TYPE.DECIMAL,
67
+ PRIMITIVE_TYPE.FLOAT,
68
+ PRIMITIVE_TYPE.DATE,
69
+ PRIMITIVE_TYPE.STRICTDATE,
70
+ PRIMITIVE_TYPE.DATETIME,
71
+ ] as string[]
72
+ ).includes(normalizedType)
73
+ );
67
74
  }
68
75
 
69
76
  isCompatibleWithFilterConditionValue(
@@ -23,7 +23,6 @@ import {
23
23
  PRIMITIVE_TYPE,
24
24
  type ValueSpecification,
25
25
  type SimpleFunctionExpression,
26
- PrimitiveType,
27
26
  } from '@finos/legend-graph';
28
27
  import {
29
28
  type Hashable,
@@ -37,6 +36,7 @@ import {
37
36
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../../graph/QueryBuilderMetaModelConst.js';
38
37
  import {
39
38
  buildNotExpression,
39
+ getStandardPrimitiveTypeEquivalent,
40
40
  unwrapNotExpression,
41
41
  } from '../../QueryBuilderValueSpecificationHelper.js';
42
42
  import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../../QueryBuilderStateHashUtils.js';
@@ -54,9 +54,10 @@ export class QueryBuilderFilterOperator_StartWith
54
54
  filterConditionState: FilterConditionState,
55
55
  ): boolean {
56
56
  return (
57
- PrimitiveType.STRING ===
58
- filterConditionState.propertyExpressionState.propertyExpression.func.value
59
- .genericType.value.rawType
57
+ getStandardPrimitiveTypeEquivalent(
58
+ filterConditionState.propertyExpressionState.propertyExpression.func
59
+ .value.genericType.value.rawType,
60
+ ) === PRIMITIVE_TYPE.STRING
60
61
  );
61
62
  }
62
63
 
@@ -68,7 +69,10 @@ export class QueryBuilderFilterOperator_StartWith
68
69
  !filterConditionState.rightConditionValue.isCollection
69
70
  ? filterConditionState.rightConditionValue.type
70
71
  : undefined;
71
- return PrimitiveType.STRING === type;
72
+ return (
73
+ type !== undefined &&
74
+ getStandardPrimitiveTypeEquivalent(type) === PRIMITIVE_TYPE.STRING
75
+ );
72
76
  }
73
77
 
74
78
  getDefaultFilterConditionValue(
@@ -53,7 +53,10 @@ import {
53
53
  guaranteeNonNullable,
54
54
  returnUndefOnError,
55
55
  } from '@finos/legend-shared';
56
- import { generateDefaultValueForPrimitiveType } from '../QueryBuilderValueSpecificationHelper.js';
56
+ import {
57
+ generateDefaultValueForPrimitiveType,
58
+ getStandardPrimitiveTypeEquivalent,
59
+ } from '../QueryBuilderValueSpecificationHelper.js';
57
60
  import {
58
61
  functionExpression_setParametersValues,
59
62
  instanceValue_setValues,
@@ -248,7 +251,8 @@ export const buildDefaultInstanceValue = (
248
251
  observerContext: ObserverContext,
249
252
  enableInitializingDefaultValue: boolean,
250
253
  ): ValueSpecification => {
251
- const path = type.path;
254
+ // Normalize precise primitive types to their standard equivalents
255
+ const path = getStandardPrimitiveTypeEquivalent(type) ?? type.path;
252
256
  switch (path) {
253
257
  case PRIMITIVE_TYPE.STRING:
254
258
  case PRIMITIVE_TYPE.STRICTDATE: