@finos/legend-application-query 13.8.6 → 13.8.8

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 (38) hide show
  1. package/lib/components/Core_LegendQueryApplicationPlugin.js +3 -3
  2. package/lib/components/Core_LegendQueryApplicationPlugin.js.map +1 -1
  3. package/lib/components/__test-utils__/QueryEditorComponentTestUtils.d.ts.map +1 -1
  4. package/lib/components/__test-utils__/QueryEditorComponentTestUtils.js +2 -2
  5. package/lib/components/__test-utils__/QueryEditorComponentTestUtils.js.map +1 -1
  6. package/lib/components/data-product/DataProductInfo.d.ts.map +1 -1
  7. package/lib/components/data-product/DataProductInfo.js +1 -1
  8. package/lib/components/data-product/DataProductInfo.js.map +1 -1
  9. package/lib/components/data-product/LegendQueryDataProductQueryBuilder.js +2 -2
  10. package/lib/components/data-product/LegendQueryDataProductQueryBuilder.js.map +1 -1
  11. package/lib/index.css +1 -1
  12. package/lib/light-mode.css +2 -2
  13. package/lib/light-mode.css.map +1 -1
  14. package/lib/package.json +1 -1
  15. package/lib/stores/QueryEditorStore.d.ts.map +1 -1
  16. package/lib/stores/QueryEditorStore.js +4 -2
  17. package/lib/stores/QueryEditorStore.js.map +1 -1
  18. package/lib/stores/data-product/query-builder/DataProductArtifactHelper.d.ts.map +1 -1
  19. package/lib/stores/data-product/query-builder/DataProductArtifactHelper.js +0 -8
  20. package/lib/stores/data-product/query-builder/DataProductArtifactHelper.js.map +1 -1
  21. package/lib/stores/data-space/DataProductQueryCreatorStore.d.ts.map +1 -1
  22. package/lib/stores/data-space/DataProductQueryCreatorStore.js +3 -3
  23. package/lib/stores/data-space/DataProductQueryCreatorStore.js.map +1 -1
  24. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.d.ts.map +1 -1
  25. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.js +2 -2
  26. package/lib/stores/data-space/DataSpaceTemplateQueryCreatorStore.js.map +1 -1
  27. package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.js +1 -1
  28. package/lib/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.js.map +1 -1
  29. package/package.json +10 -10
  30. package/src/components/Core_LegendQueryApplicationPlugin.tsx +3 -3
  31. package/src/components/__test-utils__/QueryEditorComponentTestUtils.tsx +10 -2
  32. package/src/components/data-product/DataProductInfo.tsx +12 -10
  33. package/src/components/data-product/LegendQueryDataProductQueryBuilder.tsx +2 -2
  34. package/src/stores/QueryEditorStore.ts +8 -2
  35. package/src/stores/data-product/query-builder/DataProductArtifactHelper.ts +0 -9
  36. package/src/stores/data-space/DataProductQueryCreatorStore.ts +5 -3
  37. package/src/stores/data-space/DataSpaceTemplateQueryCreatorStore.ts +4 -2
  38. package/src/stores/data-space/query-builder/LegendQueryDataSpaceQueryBuilderState.ts +1 -1
@@ -1231,7 +1231,11 @@ export abstract class QueryEditorStore {
1231
1231
  sourceInfo,
1232
1232
  );
1233
1233
  // Pass pre-resolved state to avoid double-resolution
1234
- queryBuilderState.initWithDataProduct(dataProduct, resolvedState);
1234
+ queryBuilderState.initWithDataProduct(
1235
+ dataProduct,
1236
+ undefined,
1237
+ resolvedState,
1238
+ );
1235
1239
 
1236
1240
  // 7. Wire in mapping coverage result
1237
1241
  const mappingCoverageResult =
@@ -1252,7 +1256,9 @@ export abstract class QueryEditorStore {
1252
1256
  execValue,
1253
1257
  queryBuilderState,
1254
1258
  ).withAdhocRuntime();
1255
- queryBuilderState.changeMapping(queryBuilderState.executionState.mapping);
1259
+ if (queryBuilderState.executionState.mapping) {
1260
+ queryBuilderState.changeMapping(queryBuilderState.executionState.mapping);
1261
+ }
1256
1262
  queryBuilderState.changeRuntime(
1257
1263
  new RuntimePointer(
1258
1264
  PackageableElementExplicitReference.create(packageableRuntime),
@@ -33,15 +33,6 @@ export const resolveDefaultDataProductAccessType = (
33
33
  id: modelAcessGroup.id,
34
34
  };
35
35
  }
36
-
37
- // const native =
38
- // dataProductArtifact.nativeModelAccess?.nativeModelExecutionContexts[0];
39
- // if (native) {
40
- // return {
41
- // type: DataProductAccessType.NATIVE,
42
- // id: native.key,
43
- // };
44
- // }
45
36
  throw new Error(
46
37
  `Data Product not supported for querying on legend query ${dataProductArtifact.dataProduct.path}. Must contain a model access point or native model access.`,
47
38
  );
@@ -512,7 +512,7 @@ export class DataProductQueryCreatorStore extends QueryEditorStore {
512
512
 
513
513
  // set class if already chosen
514
514
  if (queryableDataSpace.classPath) {
515
- queryBuilderState.changeClass(
515
+ queryBuilderState.changeSourceElement(
516
516
  this.graphManagerState.graph.getClass(queryableDataSpace.classPath),
517
517
  );
518
518
  }
@@ -661,9 +661,11 @@ export class DataProductQueryCreatorStore extends QueryEditorStore {
661
661
  query.artifactId = element.artifactId;
662
662
  query.versionId = element.versionId;
663
663
  const taggedValues = [];
664
- if (this.queryBuilderState?.class) {
664
+ if (this.queryBuilderState?.sourceClass) {
665
665
  taggedValues.push(
666
- createQueryClassTaggedValue(this.queryBuilderState.class.path),
666
+ createQueryClassTaggedValue(
667
+ this.queryBuilderState.sourceClass.path,
668
+ ),
667
669
  );
668
670
  }
669
671
  if (element instanceof QueryableDataProduct) {
@@ -274,9 +274,11 @@ export class DataSpaceTemplateQueryCreatorStore extends QueryEditorStore {
274
274
  query.groupId = this.groupId;
275
275
  query.artifactId = this.artifactId;
276
276
  query.versionId = this.versionId;
277
- if (this.queryBuilderState?.class) {
277
+ if (this.queryBuilderState?.sourceClass) {
278
278
  query.taggedValues = [
279
- createQueryClassTaggedValue(this.queryBuilderState.class.path),
279
+ createQueryClassTaggedValue(
280
+ this.queryBuilderState.sourceClass.path,
281
+ ),
280
282
  ];
281
283
  }
282
284
  },
@@ -187,7 +187,7 @@ export class LegendQueryDataSpaceQueryBuilderState extends DataSpaceQueryBuilder
187
187
  dataSpace.path,
188
188
  executionContext.name,
189
189
  runtimePath,
190
- this.class?.path,
190
+ this.sourceClass?.path,
191
191
  );
192
192
  }
193
193
  const route =