@finos/legend-query-builder 4.18.0 → 4.18.2

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 (135) hide show
  1. package/lib/__test__.d.ts +1 -0
  2. package/lib/__test__.d.ts.map +1 -1
  3. package/lib/__test__.js +1 -0
  4. package/lib/__test__.js.map +1 -1
  5. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  6. package/lib/components/QueryBuilderSideBar.js +10 -2
  7. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  8. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +5 -0
  9. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  10. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +28 -2
  11. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
  12. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  13. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +8 -2
  14. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  15. package/lib/components/result/tds/QueryBuilderTDSCellSelectionStatsBar.d.ts.map +1 -1
  16. package/lib/components/result/tds/QueryBuilderTDSCellSelectionStatsBar.js +15 -3
  17. package/lib/components/result/tds/QueryBuilderTDSCellSelectionStatsBar.js.map +1 -1
  18. package/lib/components/sql-playground/SQLPlaygroundPanel.d.ts.map +1 -1
  19. package/lib/components/sql-playground/SQLPlaygroundPanel.js +9 -5
  20. package/lib/components/sql-playground/SQLPlaygroundPanel.js.map +1 -1
  21. package/lib/components/workflows/AccessorQueryBuilder.js +1 -1
  22. package/lib/components/workflows/AccessorQueryBuilder.js.map +1 -1
  23. package/lib/components/workflows/DataProductQueryBuilder.d.ts.map +1 -1
  24. package/lib/components/workflows/DataProductQueryBuilder.js +13 -12
  25. package/lib/components/workflows/DataProductQueryBuilder.js.map +1 -1
  26. package/lib/data-access-overview.css +1 -1
  27. package/lib/graph/QueryBuilderMetaModelConst.d.ts +2 -0
  28. package/lib/graph/QueryBuilderMetaModelConst.d.ts.map +1 -1
  29. package/lib/graph/QueryBuilderMetaModelConst.js +2 -0
  30. package/lib/graph/QueryBuilderMetaModelConst.js.map +1 -1
  31. package/lib/index.css +2 -2
  32. package/lib/index.css.map +1 -1
  33. package/lib/index.d.ts +1 -1
  34. package/lib/index.d.ts.map +1 -1
  35. package/lib/index.js +1 -1
  36. package/lib/index.js.map +1 -1
  37. package/lib/package.json +1 -1
  38. package/lib/stores/QueryBuilderStateHashUtils.d.ts +1 -0
  39. package/lib/stores/QueryBuilderStateHashUtils.d.ts.map +1 -1
  40. package/lib/stores/QueryBuilderStateHashUtils.js +1 -0
  41. package/lib/stores/QueryBuilderStateHashUtils.js.map +1 -1
  42. package/lib/stores/QueryBuilderTypeaheadHelper.js +4 -4
  43. package/lib/stores/QueryBuilderTypeaheadHelper.js.map +1 -1
  44. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts +1 -1
  45. package/lib/stores/QueryBuilderValueSpecificationHelper.d.ts.map +1 -1
  46. package/lib/stores/QueryBuilderValueSpecificationHelper.js +2 -2
  47. package/lib/stores/QueryBuilderValueSpecificationHelper.js.map +1 -1
  48. package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.d.ts +374 -0
  49. package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.d.ts.map +1 -0
  50. package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.js +625 -0
  51. package/lib/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.js.map +1 -0
  52. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  53. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +3 -2
  54. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  55. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.js +2 -2
  56. package/lib/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.js.map +1 -1
  57. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js +1 -1
  58. package/lib/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.js.map +1 -1
  59. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  60. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +8 -6
  61. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  62. package/lib/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.js +2 -2
  63. package/lib/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.js.map +1 -1
  64. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.d.ts.map +1 -1
  65. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js +2 -0
  66. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.js.map +1 -1
  67. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.d.ts.map +1 -1
  68. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js +40 -14
  69. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.js.map +1 -1
  70. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.d.ts.map +1 -1
  71. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js +72 -30
  72. package/lib/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.js.map +1 -1
  73. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts +1 -1
  74. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.d.ts.map +1 -1
  75. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js +1 -1
  76. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.js.map +1 -1
  77. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js +1 -1
  78. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.js.map +1 -1
  79. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js +1 -1
  80. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.js.map +1 -1
  81. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js +1 -1
  82. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.js.map +1 -1
  83. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.d.ts +25 -0
  84. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.d.ts.map +1 -0
  85. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.js +54 -0
  86. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.js.map +1 -0
  87. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js +1 -1
  88. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.js.map +1 -1
  89. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js +1 -1
  90. package/lib/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.js.map +1 -1
  91. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js +3 -3
  92. package/lib/stores/filter/QueryBuilderFilterValueSpecificationBuilder.js.map +1 -1
  93. package/lib/stores/workflows/accessor/AccessorQueryBuilderState.d.ts +1 -0
  94. package/lib/stores/workflows/accessor/AccessorQueryBuilderState.d.ts.map +1 -1
  95. package/lib/stores/workflows/accessor/AccessorQueryBuilderState.js +4 -0
  96. package/lib/stores/workflows/accessor/AccessorQueryBuilderState.js.map +1 -1
  97. package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.d.ts +38 -9
  98. package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.d.ts.map +1 -1
  99. package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.js +263 -45
  100. package/lib/stores/workflows/dataProduct/DataProductQueryBuilderState.js.map +1 -1
  101. package/package.json +10 -10
  102. package/src/__test__.ts +1 -0
  103. package/src/components/QueryBuilderSideBar.tsx +10 -7
  104. package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +73 -1
  105. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +10 -4
  106. package/src/components/result/tds/QueryBuilderTDSCellSelectionStatsBar.tsx +33 -3
  107. package/src/components/sql-playground/SQLPlaygroundPanel.tsx +10 -5
  108. package/src/components/workflows/AccessorQueryBuilder.tsx +2 -2
  109. package/src/components/workflows/DataProductQueryBuilder.tsx +40 -62
  110. package/src/graph/QueryBuilderMetaModelConst.ts +2 -0
  111. package/src/index.ts +3 -0
  112. package/src/stores/QueryBuilderStateHashUtils.ts +1 -0
  113. package/src/stores/QueryBuilderTypeaheadHelper.ts +4 -4
  114. package/src/stores/QueryBuilderValueSpecificationHelper.ts +5 -3
  115. package/src/stores/__test-utils__/TEST_DATA__QueryBuilder_Accessors.ts +630 -0
  116. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +3 -2
  117. package/src/stores/fetch-structure/tds/aggregation/QueryBuilderRelationAggregationValueSpecBuilder.ts +2 -2
  118. package/src/stores/fetch-structure/tds/post-filter/QueryBuilderPostFilterValueSpecificationBuilder.ts +1 -1
  119. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +8 -6
  120. package/src/stores/fetch-structure/tds/projection/QueryBuilderRelationProjectValueSpecBuilder.ts +2 -2
  121. package/src/stores/fetch-structure/tds/window/QueryBuilderWindowGroupByOperatorLoader.ts +2 -0
  122. package/src/stores/fetch-structure/tds/window/QueryBuilderWindowStateBuilder.ts +85 -25
  123. package/src/stores/fetch-structure/tds/window/QueryBuilderWindowValueSpecificationBuilder.ts +141 -38
  124. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator.ts +1 -1
  125. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Average.ts +1 -1
  126. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Count.ts +1 -1
  127. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Max.ts +1 -1
  128. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Min.ts +1 -1
  129. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_PercentRank.ts +57 -0
  130. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowOperator_Sum.ts +1 -1
  131. package/src/stores/fetch-structure/tds/window/operators/QueryBuilderTDS_WindowRankOperator_RowNumber.ts +1 -1
  132. package/src/stores/filter/QueryBuilderFilterValueSpecificationBuilder.ts +3 -3
  133. package/src/stores/workflows/accessor/AccessorQueryBuilderState.ts +5 -0
  134. package/src/stores/workflows/dataProduct/DataProductQueryBuilderState.ts +424 -69
  135. package/tsconfig.json +2 -0
@@ -13,13 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type GraphManagerState, type Class, DataProduct, type V1_DataProductArtifact, ModelAccessPointGroup, NativeModelExecutionContext, type NativeModelAccess, type Mapping, type DataProductElementScope, PackageableRuntime, type LambdaFunction, type QueryExecutionContext, type RawLambda } from '@finos/legend-graph';
16
+ import { type GraphManagerState, type Class, DataProduct, type V1_DataProductArtifact, ModelAccessPointGroup, NativeModelExecutionContext, type NativeModelAccess, type Mapping, type DataProductElementScope, PackageableRuntime, type LambdaFunction, type MappingModelCoverageAnalysisResult, type QueryExecutionContext, LakehouseAccessPoint, type RawLambda, type Accessor, type RelationTypeMetadata, DataProductAccessor, type PureModel } from '@finos/legend-graph';
17
17
  import { QueryBuilderState } from '../../QueryBuilderState.js';
18
18
  import { type GenericLegendApplicationStore } from '@finos/legend-application';
19
19
  import type { QueryBuilderActionConfig, QueryBuilderWorkflowState } from '../../query-workflow/QueryBuilderWorkFlowState.js';
20
20
  import type { QueryBuilderConfig } from '../../../graph-manager/QueryBuilderConfig.js';
21
21
  import { ActionState, type GeneratorFn } from '@finos/legend-shared';
22
22
  import { DepotEntityWithOrigin, type QueryableSourceInfo } from '@finos/legend-storage';
23
+ export declare const buildDataProductAccessor: (relationMetadata: RelationTypeMetadata, dataProduct: DataProduct, accessPoint: LakehouseAccessPoint, graph: PureModel) => DataProductAccessor;
23
24
  export type DataProductOption = {
24
25
  label: string;
25
26
  value: DepotEntityWithOrigin;
@@ -34,13 +35,19 @@ export type ModelAccessPointGroupOption = {
34
35
  value: ModelAccessPointGroup;
35
36
  };
36
37
  export declare const buildModelAccessPointGroupOption: (value: ModelAccessPointGroup) => ModelAccessPointGroupOption;
38
+ export type ExecutionIdOption = {
39
+ label: string;
40
+ tag: string;
41
+ value: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint;
42
+ };
37
43
  export declare abstract class DataProductExecutionState<T> {
38
44
  readonly queryBuilderState: DataProductQueryBuilderState;
39
45
  exectionValue: T;
40
46
  constructor(executionState: T, queryBuilderState: DataProductQueryBuilderState);
41
47
  abstract get label(): string;
42
- abstract get mapping(): Mapping;
48
+ abstract get mapping(): Mapping | undefined;
43
49
  abstract get featuredElements(): DataProductElementScope[] | undefined;
50
+ get showRuntimeOptions(): boolean;
44
51
  get selectedOption(): {
45
52
  label: string;
46
53
  value: T;
@@ -65,38 +72,60 @@ export declare class ModelAccessPointDataProductExecutionState extends DataProdu
65
72
  get showRuntimeOptions(): boolean;
66
73
  get compatibleRuntimes(): PackageableRuntime[];
67
74
  }
75
+ export declare class LakehouseDataProductExecutionState extends DataProductExecutionState<LakehouseAccessPoint> {
76
+ selectedRuntime: PackageableRuntime | undefined;
77
+ adhocRuntime: boolean;
78
+ constructor(executionState: LakehouseAccessPoint, queryBuilderState: DataProductQueryBuilderState);
79
+ changeSelectedRuntime(val: PackageableRuntime): void;
80
+ get label(): string;
81
+ get mapping(): Mapping | undefined;
82
+ get featuredElements(): DataProductElementScope[] | undefined;
83
+ get compatibleRuntimes(): PackageableRuntime[];
84
+ get showRuntimeOptions(): boolean;
85
+ }
68
86
  export declare class DataProductQueryBuilderState extends QueryBuilderState {
69
87
  readonly onClassChange?: ((val: Class) => void) | undefined;
70
88
  readonly onDataProductChange?: (val: DepotEntityWithOrigin) => Promise<void>;
71
- readonly onExecutionContextChange?: ((val: NativeModelExecutionContext) => void) | undefined;
72
89
  loadDataProductModelState: ActionState;
73
90
  dataProduct: DataProduct;
74
91
  dataProductArtifact: V1_DataProductArtifact | undefined;
75
- executionState: DataProductExecutionState<NativeModelExecutionContext | ModelAccessPointGroup>;
92
+ executionState: DataProductExecutionState<NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint>;
76
93
  entities: DepotEntityWithOrigin[] | undefined;
94
+ mappingToMappingCoverageResult?: Map<string, MappingModelCoverageAnalysisResult>;
77
95
  prioritizeEntityFunc?: ((val: DepotEntityWithOrigin) => boolean) | undefined;
78
96
  TEMPORARY__setupPanelContentRenderer: () => React.ReactNode;
79
- constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflow: QueryBuilderWorkflowState, dataProduct: DataProduct, artifact: V1_DataProductArtifact | undefined, actionConfig: QueryBuilderActionConfig, executionState: NativeModelExecutionContext | ModelAccessPointGroup, prioritizeEntityFunc: ((val: DepotEntityWithOrigin) => boolean) | undefined, onDataProductChange: (val: DepotEntityWithOrigin) => Promise<void>, onExecutionContextChange?: ((val: NativeModelExecutionContext) => void) | undefined, onClassChange?: ((val: Class) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: QueryableSourceInfo | undefined);
97
+ constructor(applicationStore: GenericLegendApplicationStore, graphManagerState: GraphManagerState, workflow: QueryBuilderWorkflowState, dataProduct: DataProduct, artifact: V1_DataProductArtifact | undefined, actionConfig: QueryBuilderActionConfig, executionState: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint, prioritizeEntityFunc: ((val: DepotEntityWithOrigin) => boolean) | undefined, onDataProductChange: (val: DepotEntityWithOrigin) => Promise<void>, onClassChange?: ((val: Class) => void) | undefined, config?: QueryBuilderConfig | undefined, sourceInfo?: QueryableSourceInfo | undefined);
98
+ prepareAccessForExecution(): Promise<void>;
80
99
  get isProductLinkable(): boolean;
81
100
  get isNativeMode(): boolean;
82
101
  get isModelAccessPointGroupMode(): boolean;
102
+ get isLakehouseMode(): boolean;
83
103
  get showExecutionContextOptions(): boolean;
84
104
  get showModelAccessPointGroupSelector(): boolean;
105
+ get hasNativeModelAccess(): boolean;
106
+ get hasBothAccessModes(): boolean;
107
+ get showContextSelector(): boolean;
108
+ get allContextOptions(): ExecutionIdOption[];
109
+ get selectedContextOption(): ExecutionIdOption | undefined;
110
+ get executionIdOptions(): ExecutionIdOption[];
111
+ get selectedExecutionIdOption(): ExecutionIdOption | undefined;
112
+ get showExecutionIdSelector(): boolean;
113
+ changeExecutionId(option: ExecutionIdOption): Promise<void>;
85
114
  get selectedExecOption(): {
86
115
  label: string;
87
116
  value: NativeModelExecutionContext;
88
117
  } | undefined;
118
+ get requiresMappingForExecution(): boolean;
89
119
  get selectedModelAccessPointGroupOption(): ModelAccessPointGroupOption | undefined;
90
120
  get usableClasses(): Class[];
91
- changeNativeExecutionContext(val: NativeModelExecutionContext): void;
92
- changeModelAccessPointGroupValue(val: ModelAccessPointGroup): void;
93
121
  buildQueryForPersistence(): RawLambda;
94
122
  getQueryExecutionContext(): QueryExecutionContext;
95
123
  handleDataProductChange(val: DepotEntityWithOrigin): void;
96
- initWithDataProduct(dataProduct: DataProduct, preResolvedState?: NativeModelExecutionContext | ModelAccessPointGroup): void;
124
+ initWithDataProduct(dataProduct: DataProduct, accessor: Accessor | undefined, preResolvedState?: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): void;
97
125
  copyDataProductLinkToClipBoard(): void;
98
126
  protected getElementType(): typeof DataProduct;
99
- setExecutionState(val: NativeModelExecutionContext | ModelAccessPointGroup): void;
127
+ setExecutionState(val: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): void;
128
+ changeExecutionState(val: NativeModelExecutionContext | ModelAccessPointGroup | LakehouseAccessPoint): Promise<void>;
100
129
  get modelAccessPointGroups(): ModelAccessPointGroup[];
101
130
  get hasModelAccessPointGroups(): boolean;
102
131
  get modelAccessPointGroupOptions(): ModelAccessPointGroupOption[];
@@ -1 +1 @@
1
- {"version":3,"file":"DataProductQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../../src/stores/workflows/dataProduct/DataProductQueryBuilderState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,KAAK,EACV,WAAW,EACX,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,2BAA2B,EAE3B,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,kBAAkB,EAGlB,KAAK,cAAc,EASnB,KAAK,qBAAqB,EAG1B,KAAK,SAAS,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,KAAK,EAAE,k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AG,EAAE,qBAAqB,GAAG,IAAI;IAazD,wBAAwB,IAAI,SAAS;IAgBrC,wBAAwB,IAAI,qBAAqB;IAiB1D,uBAAuB,CAAC,GAAG,EAAE,qBAAqB,GAAG,IAAI;IAkCzD,mBAAmB,CACjB,WAAW,EAAE,WAAW,EACxB,gBAAgB,CAAC,EAAE,2BAA2B,GAAG,qBAAqB,GACrE,IAAI;IA6CP,8BAA8B,IAAI,IAAI;IAQtC,SAAS,CAAC,cAAc,IAAI,OAAO,WAAW;IAI9C,iBAAiB,CACf,GAAG,EAAE,2BAA2B,GAAG,qBAAqB,GACvD,IAAI;IAOP,IAAI,sBAAsB,IAAI,qBAAqB,EAAE,CAIpD;IAED,IAAI,yBAAyB,IAAI,OAAO,CAEvC;IAED,IAAI,4BAA4B,IAAI,2BAA2B,EAAE,CAIhE;IAED,IAAI,aAAa,IAAI,OAAO,GAAG,SAAS,CAEvC;IAED,IAAI,sBAAsB,IAAI,uBAAuB,EAAE,GAAG,SAAS,CAElE;IAEQ,+BAA+B,CACtC,cAAc,EAAE,cAAc,GAC7B,cAAc;IAsChB,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAQlC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,qBAAqB;IASvE,IAAI,kBAAkB,IAAI,iBAAiB,EAAE,CAe5C;IAED,IAAI,yBAAyB,IAAI,iBAAiB,CAUjD;IAED,IAAI,WAAW,IAAI,OAAO,CAQzB;IAGD,IAAI,WAAW,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,2BAA2B,CAAA;KAAE,EAAE,CAMzE;IAEc,+BAA+B,CAC5C,sBAAsB,CAAC,EAAE,OAAO,GAAG,SAAS,GAC3C,OAAO,CAAC,IAAI,CAAC;CAkBjB"}
1
+ {"version":3,"file":"DataProductQueryBuilderState.d.ts","sourceRoot":"","sources":["../../../../src/stores/workflows/dataProduct/DataProductQueryBuilderState.ts"],"names":[],"mappings":"AA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AED,IAAI,aAAa,IAAI,OAAO,GAAG,SAAS,CAEvC;IAED,IAAI,sBAAsB,IAAI,uBAAuB,EAAE,GAAG,SAAS,CAElE;IAEQ,+BAA+B,CACtC,cAAc,EAAE,cAAc,GAC7B,cAAc;IAsChB,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAQlC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,qBAAqB;IASvE,IAAI,kBAAkB,IAAI,iBAAiB,EAAE,CAe5C;IAED,IAAI,yBAAyB,IAAI,iBAAiB,CAUjD;IAED,IAAI,WAAW,IAAI,OAAO,CAYzB;IAGD,IAAI,WAAW,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,2BAA2B,CAAA;KAAE,EAAE,CAMzE;IAEc,+BAA+B,CAC5C,sBAAsB,CAAC,EAAE,OAAO,GAAG,SAAS,GAC3C,OAAO,CAAC,IAAI,CAAC;CAsFjB"}
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { DataProduct, ModelAccessPointGroup, NativeModelExecutionContext, CORE_PURE_PATH, PackageableRuntime, resolveUsableDataProductClasses, LakehouseRuntime, SimpleFunctionExpression, InstanceValue, Multiplicity, extractElementNameFromPath, SUPPORTED_FUNCTIONS, PackageableElementExplicitReference, resolveDataProductExecutionState, RuntimePointer, QueryDataProductNativeExecutionContext, QueryDataProductModelAccessExecutionContext, buildRawLambdaFromLambdaFunction, } from '@finos/legend-graph';
16
+ import { DataProduct, ModelAccessPointGroup, NativeModelExecutionContext, CORE_PURE_PATH, PackageableRuntime, resolveUsableDataProductClasses, LakehouseRuntime, SimpleFunctionExpression, InstanceValue, Multiplicity, extractElementNameFromPath, SUPPORTED_FUNCTIONS, PackageableElementExplicitReference, resolveDataProductExecutionState, RuntimePointer, QueryDataProductNativeExecutionContext, QueryDataProductModelAccessExecutionContext, QueryDataProductLakehouseExecutionContext, LakehouseAccessPoint, buildRawLambdaFromLambdaFunction, DataProductAccessor, RelationType, RelationColumn, GenericType, GenericTypeExplicitReference, findLakehouseAccessPointGroup, DataProductAccessType, LegendSDLC, } from '@finos/legend-graph';
17
17
  import { QueryBuilderState } from '../../QueryBuilderState.js';
18
18
  import {} from '@finos/legend-application';
19
19
  import { renderDataProductQueryBuilderSetupPanelContent } from '../../../components/workflows/DataProductQueryBuilder.js';
@@ -23,6 +23,12 @@ import { DepotEntityWithOrigin, } from '@finos/legend-storage';
23
23
  import { compareLabelFn } from '@finos/legend-art';
24
24
  import { QueryBuilderEmbeddedFromExecutionContextState } from '../../QueryBuilderExecutionContextState.js';
25
25
  import { buildLambdaFunction } from '../../QueryBuilderValueSpecificationBuilder.js';
26
+ export const buildDataProductAccessor = (relationMetadata, dataProduct, accessPoint, graph) => {
27
+ const relationType = new RelationType(accessPoint.title ?? accessPoint.id);
28
+ relationType.columns = relationMetadata.columns.map((col) => new RelationColumn(col.name, GenericTypeExplicitReference.create(new GenericType(graph.getType(col.type)))));
29
+ const groupResult = findLakehouseAccessPointGroup(dataProduct, accessPoint.id);
30
+ return new DataProductAccessor(dataProduct.path, groupResult?.group.id, accessPoint.id, relationType, dataProduct);
31
+ };
26
32
  export const buildDataProductOption = (value) => ({
27
33
  label: value.name,
28
34
  value,
@@ -44,6 +50,9 @@ export class DataProductExecutionState {
44
50
  this.queryBuilderState = queryBuilderState;
45
51
  this.exectionValue = executionState;
46
52
  }
53
+ get showRuntimeOptions() {
54
+ return false;
55
+ }
47
56
  get selectedOption() {
48
57
  return {
49
58
  label: this.label,
@@ -106,18 +115,46 @@ export class ModelAccessPointDataProductExecutionState extends DataProductExecut
106
115
  return this.queryBuilderState.graphManagerState.usableRuntimes.filter((runtime) => runtime.runtimeValue instanceof LakehouseRuntime);
107
116
  }
108
117
  }
118
+ export class LakehouseDataProductExecutionState extends DataProductExecutionState {
119
+ selectedRuntime;
120
+ adhocRuntime = false;
121
+ constructor(executionState, queryBuilderState) {
122
+ super(executionState, queryBuilderState);
123
+ makeObservable(this, {});
124
+ this.selectedRuntime = this.compatibleRuntimes[0];
125
+ }
126
+ changeSelectedRuntime(val) {
127
+ this.selectedRuntime = val;
128
+ this.queryBuilderState.changeRuntime(val);
129
+ }
130
+ get label() {
131
+ return this.exectionValue.title ?? this.exectionValue.id;
132
+ }
133
+ get mapping() {
134
+ return undefined;
135
+ }
136
+ get featuredElements() {
137
+ return undefined;
138
+ }
139
+ get compatibleRuntimes() {
140
+ return this.queryBuilderState.graphManagerState.usableRuntimes.filter((runtime) => runtime.runtimeValue instanceof LakehouseRuntime);
141
+ }
142
+ get showRuntimeOptions() {
143
+ return this.compatibleRuntimes.length > 1;
144
+ }
145
+ }
109
146
  export class DataProductQueryBuilderState extends QueryBuilderState {
110
147
  onClassChange;
111
148
  onDataProductChange;
112
- onExecutionContextChange;
113
149
  loadDataProductModelState = ActionState.create();
114
150
  dataProduct;
115
151
  dataProductArtifact;
116
152
  executionState;
117
153
  entities;
154
+ mappingToMappingCoverageResult;
118
155
  prioritizeEntityFunc;
119
156
  TEMPORARY__setupPanelContentRenderer = () => renderDataProductQueryBuilderSetupPanelContent(this);
120
- constructor(applicationStore, graphManagerState, workflow, dataProduct, artifact, actionConfig, executionState, prioritizeEntityFunc, onDataProductChange, onExecutionContextChange, onClassChange, config, sourceInfo) {
157
+ constructor(applicationStore, graphManagerState, workflow, dataProduct, artifact, actionConfig, executionState, prioritizeEntityFunc, onDataProductChange, onClassChange, config, sourceInfo) {
121
158
  super(applicationStore, graphManagerState, workflow, config, sourceInfo);
122
159
  makeObservable(this, {
123
160
  dataProduct: observable,
@@ -129,8 +166,17 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
129
166
  isProductLinkable: computed,
130
167
  isNativeMode: computed,
131
168
  isModelAccessPointGroupMode: computed,
169
+ isLakehouseMode: computed,
132
170
  showExecutionContextOptions: computed,
133
171
  showModelAccessPointGroupSelector: computed,
172
+ showExecutionIdSelector: computed,
173
+ executionIdOptions: computed,
174
+ selectedExecutionIdOption: computed,
175
+ hasNativeModelAccess: computed,
176
+ hasBothAccessModes: computed,
177
+ showContextSelector: computed,
178
+ allContextOptions: computed,
179
+ selectedContextOption: computed,
134
180
  selectedExecOption: computed,
135
181
  selectedModelAccessPointGroupOption: computed,
136
182
  usableClasses: computed,
@@ -151,11 +197,28 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
151
197
  this.executionState =
152
198
  executionState instanceof NativeModelExecutionContext
153
199
  ? new NativeModelDataProductExecutionState(executionState, this)
154
- : new ModelAccessPointDataProductExecutionState(executionState, this);
200
+ : executionState instanceof LakehouseAccessPoint
201
+ ? new LakehouseDataProductExecutionState(executionState, this)
202
+ : new ModelAccessPointDataProductExecutionState(executionState, this);
155
203
  this.prioritizeEntityFunc = prioritizeEntityFunc;
156
204
  this.onDataProductChange = onDataProductChange;
157
- this.onExecutionContextChange = onExecutionContextChange;
158
205
  this.onClassChange = onClassChange;
206
+ // force from.
207
+ this.executionContextState =
208
+ new QueryBuilderEmbeddedFromExecutionContextState(this);
209
+ }
210
+ async prepareAccessForExecution() {
211
+ if (this.executionState instanceof NativeModelDataProductExecutionState) {
212
+ const runtime = this.executionState.exectionValue.runtime;
213
+ if (runtime) {
214
+ this.changeRuntime(new RuntimePointer(runtime));
215
+ }
216
+ }
217
+ else if (this.executionState instanceof
218
+ ModelAccessPointDataProductExecutionState &&
219
+ this.executionState.selectedRuntime) {
220
+ this.changeRuntime(new RuntimePointer(PackageableElementExplicitReference.create(this.executionState.selectedRuntime)));
221
+ }
159
222
  }
160
223
  get isProductLinkable() {
161
224
  return false;
@@ -166,6 +229,9 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
166
229
  get isModelAccessPointGroupMode() {
167
230
  return (this.executionState instanceof ModelAccessPointDataProductExecutionState);
168
231
  }
232
+ get isLakehouseMode() {
233
+ return this.executionState instanceof LakehouseDataProductExecutionState;
234
+ }
169
235
  get showExecutionContextOptions() {
170
236
  return this.isNativeMode && this.execOptions.length > 1;
171
237
  }
@@ -173,11 +239,100 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
173
239
  return (this.isModelAccessPointGroupMode &&
174
240
  this.modelAccessPointGroupOptions.length > 1);
175
241
  }
242
+ get hasNativeModelAccess() {
243
+ return this.dataProduct.nativeModelAccess !== undefined;
244
+ }
245
+ get hasBothAccessModes() {
246
+ return this.hasModelAccessPointGroups && this.hasNativeModelAccess;
247
+ }
248
+ // showContextSelector / allContextOptions / selectedContextOption are aliases
249
+ // over the upstream ExecutionIdOption API so existing UI code keeps working.
250
+ get showContextSelector() {
251
+ return this.showExecutionIdSelector;
252
+ }
253
+ get allContextOptions() {
254
+ return this.executionIdOptions;
255
+ }
256
+ get selectedContextOption() {
257
+ return this.selectedExecutionIdOption;
258
+ }
259
+ get executionIdOptions() {
260
+ const nativeOptions = (this.dataProduct.nativeModelAccess?.nativeModelExecutionContexts ?? []).map((ctx) => ({
261
+ label: ctx.key,
262
+ tag: 'NATIVE',
263
+ value: ctx,
264
+ }));
265
+ const modelOptions = this.modelAccessPointGroups.map((group) => ({
266
+ label: group.title ?? group.id,
267
+ tag: 'MODEL',
268
+ value: group,
269
+ }));
270
+ const lakehouseOptions = this.dataProduct.accessPointGroups
271
+ .flatMap((group) => group.accessPoints)
272
+ .filter(filterByType(LakehouseAccessPoint))
273
+ .map((ap) => ({
274
+ label: ap.title ?? ap.id,
275
+ tag: 'LAKEHOUSE',
276
+ value: ap,
277
+ }));
278
+ return [...modelOptions, ...lakehouseOptions, ...nativeOptions].sort(compareLabelFn);
279
+ }
280
+ get selectedExecutionIdOption() {
281
+ const state = this.executionState;
282
+ if (state instanceof NativeModelDataProductExecutionState) {
283
+ return {
284
+ label: state.exectionValue.key,
285
+ tag: 'NATIVE',
286
+ value: state.exectionValue,
287
+ };
288
+ }
289
+ else if (state instanceof ModelAccessPointDataProductExecutionState) {
290
+ return {
291
+ label: state.exectionValue.title ?? state.exectionValue.id,
292
+ tag: 'MODEL',
293
+ value: state.exectionValue,
294
+ };
295
+ }
296
+ else if (state instanceof LakehouseDataProductExecutionState) {
297
+ return {
298
+ label: state.exectionValue.title ?? state.exectionValue.id,
299
+ tag: 'LAKEHOUSE',
300
+ value: state.exectionValue,
301
+ };
302
+ }
303
+ return undefined;
304
+ }
305
+ get showExecutionIdSelector() {
306
+ return this.executionIdOptions.length > 1;
307
+ }
308
+ async changeExecutionId(option) {
309
+ const val = option.value;
310
+ if (val === this.executionState.exectionValue) {
311
+ return;
312
+ }
313
+ const switchingToModel = val instanceof ModelAccessPointGroup;
314
+ const switchingToNative = val instanceof NativeModelExecutionContext;
315
+ const wasModeSwitch = (switchingToModel && this.isNativeMode) ||
316
+ (switchingToNative && this.isModelAccessPointGroupMode);
317
+ if (wasModeSwitch) {
318
+ this.changeHistoryState.querySnapshotBuffer = [];
319
+ this.changeHistoryState.pointer = -1;
320
+ this.changeHistoryState.setCurrentQuery(undefined);
321
+ }
322
+ await this.changeExecutionState(val);
323
+ await this.propagateExecutionContextChange();
324
+ }
176
325
  get selectedExecOption() {
177
326
  return this.executionState instanceof NativeModelDataProductExecutionState
178
327
  ? buildExecOptions(this.executionState.exectionValue)
179
328
  : undefined;
180
329
  }
330
+ get requiresMappingForExecution() {
331
+ if (this.executionState instanceof LakehouseDataProductExecutionState) {
332
+ return false;
333
+ }
334
+ return true;
335
+ }
181
336
  get selectedModelAccessPointGroupOption() {
182
337
  return this.executionState instanceof
183
338
  ModelAccessPointDataProductExecutionState
@@ -190,23 +345,6 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
190
345
  ? resolveUsableDataProductClasses(this.activeFeaturedElements, activeMapping, this.graphManagerState, this.explorerState.mappingModelCoverageAnalysisResult)
191
346
  : [];
192
347
  }
193
- changeNativeExecutionContext(val) {
194
- if (this.isNativeMode && val === this.executionState.exectionValue) {
195
- return;
196
- }
197
- this.setExecutionState(val);
198
- this.propagateExecutionContextChange()
199
- .then(() => this.onExecutionContextChange?.(val))
200
- .catch(this.applicationStore.alertUnhandledError);
201
- }
202
- changeModelAccessPointGroupValue(val) {
203
- if (this.isModelAccessPointGroupMode &&
204
- val === this.executionState.exectionValue) {
205
- return;
206
- }
207
- this.setExecutionState(val);
208
- this.propagateExecutionContextChange().catch(this.applicationStore.alertUnhandledError);
209
- }
210
348
  buildQueryForPersistence() {
211
349
  if (!this.isQuerySupported) {
212
350
  return this.buildQuery();
@@ -232,6 +370,12 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
232
370
  execContext.accessPointGroupId = this.executionState.exectionValue.id;
233
371
  return execContext;
234
372
  }
373
+ else if (this.executionState instanceof LakehouseDataProductExecutionState) {
374
+ const execContext = new QueryDataProductLakehouseExecutionContext();
375
+ execContext.dataProductPath = this.dataProduct.path;
376
+ execContext.accessPointId = this.executionState.exectionValue.id;
377
+ return execContext;
378
+ }
235
379
  return super.getQueryExecutionContext();
236
380
  }
237
381
  handleDataProductChange(val) {
@@ -240,7 +384,7 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
240
384
  const dataProduct = this.graphManagerState.graph.getOwnNullableDataProduct(val.path) ??
241
385
  this.graphManagerState.graph.generationModel.getOwnNullableDataProduct(val.path);
242
386
  if (dataProduct) {
243
- this.initWithDataProduct(dataProduct);
387
+ this.initWithDataProduct(dataProduct, undefined, undefined);
244
388
  this.loadDataProductModelState.pass();
245
389
  }
246
390
  else if (this.onDataProductChange) {
@@ -261,15 +405,15 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
261
405
  this.loadDataProductModelState.fail();
262
406
  }
263
407
  }
264
- initWithDataProduct(dataProduct, preResolvedState) {
408
+ initWithDataProduct(dataProduct, accessor, preResolvedState) {
265
409
  try {
266
410
  const execValue = preResolvedState ?? resolveDataProductExecutionState(dataProduct);
267
411
  this.dataProduct = dataProduct;
268
- this.executionState =
269
- execValue instanceof NativeModelExecutionContext
270
- ? new NativeModelDataProductExecutionState(execValue, this)
271
- : new ModelAccessPointDataProductExecutionState(execValue, this);
272
- this.changeMapping(this.executionState.mapping);
412
+ this.setExecutionState(execValue);
413
+ const mapping = this.executionState.mapping;
414
+ if (mapping) {
415
+ this.changeMapping(mapping);
416
+ }
273
417
  if (this.executionState instanceof NativeModelDataProductExecutionState) {
274
418
  const runtime = guaranteeNonNullable(this.executionState.exectionValue.runtime, 'runtime unable to be resolved');
275
419
  this.changeRuntime(new RuntimePointer(runtime));
@@ -279,13 +423,27 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
279
423
  this.executionState.selectedRuntime instanceof PackageableRuntime) {
280
424
  this.changeRuntime(this.executionState.selectedRuntime);
281
425
  }
282
- const compatibleClasses = resolveUsableDataProductClasses(this.activeFeaturedElements, this.executionState.mapping, this.graphManagerState, undefined);
283
- // if there is no chosen class or the chosen one is not compatible
284
- // with the mapping then pick a compatible class if possible
285
- if (!this.sourceClass || !compatibleClasses.includes(this.sourceClass)) {
286
- const possibleNewClass = compatibleClasses[0];
287
- if (possibleNewClass) {
288
- this.changeSourceElement(possibleNewClass);
426
+ else if (this.executionState instanceof LakehouseDataProductExecutionState &&
427
+ accessor &&
428
+ this.executionState.selectedRuntime instanceof PackageableRuntime) {
429
+ this.setSourceElement(accessor);
430
+ this.changeRuntime(new RuntimePointer(PackageableElementExplicitReference.create(this.executionState.selectedRuntime)));
431
+ }
432
+ if (mapping) {
433
+ const coverageResult = this.mappingToMappingCoverageResult?.get(mapping.path);
434
+ if (coverageResult) {
435
+ this.explorerState.mappingModelCoverageAnalysisResult =
436
+ coverageResult;
437
+ }
438
+ const compatibleClasses = resolveUsableDataProductClasses(this.activeFeaturedElements, mapping, this.graphManagerState, coverageResult);
439
+ // if there is no chosen class or the chosen one is not compatible
440
+ // with the mapping then pick a compatible class if possible
441
+ if (!this.sourceClass ||
442
+ !compatibleClasses.includes(this.sourceClass)) {
443
+ const possibleNewClass = compatibleClasses[0];
444
+ if (possibleNewClass) {
445
+ this.changeSourceElement(possibleNewClass);
446
+ }
289
447
  }
290
448
  }
291
449
  }
@@ -306,7 +464,17 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
306
464
  this.executionState =
307
465
  val instanceof NativeModelExecutionContext
308
466
  ? new NativeModelDataProductExecutionState(val, this)
309
- : new ModelAccessPointDataProductExecutionState(val, this);
467
+ : val instanceof LakehouseAccessPoint
468
+ ? new LakehouseDataProductExecutionState(val, this)
469
+ : new ModelAccessPointDataProductExecutionState(val, this);
470
+ }
471
+ async changeExecutionState(val) {
472
+ this.setExecutionState(val);
473
+ if (val instanceof LakehouseAccessPoint) {
474
+ const relationMetadata = await this.graphManagerState.graphManager.getLambdaRelationType(val.func, this.graphManagerState.graph);
475
+ const accessor = buildDataProductAccessor(relationMetadata, this.dataProduct, val, this.graphManagerState.graph);
476
+ this.setSourceElement(accessor);
477
+ }
310
478
  }
311
479
  get modelAccessPointGroups() {
312
480
  return this.dataProduct.accessPointGroups.filter(filterByType(ModelAccessPointGroup));
@@ -380,7 +548,9 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
380
548
  get isSupported() {
381
549
  return (this.dataProduct.nativeModelAccess !== undefined ||
382
550
  // contains model access point group
383
- this.dataProduct.accessPointGroups.filter(filterByType(ModelAccessPointGroup)).length > 0);
551
+ this.dataProduct.accessPointGroups.filter(filterByType(ModelAccessPointGroup)).length > 0 ||
552
+ // contains lakehouse access point
553
+ this.dataProduct.accessPointGroups.some((group) => group.accessPoints.some((ap) => ap instanceof LakehouseAccessPoint)));
384
554
  }
385
555
  // includes model access point group if more than one group
386
556
  get execOptions() {
@@ -389,15 +559,63 @@ export class DataProductQueryBuilderState extends QueryBuilderState {
389
559
  async propagateExecutionContextChange(requireReBuildingGraph) {
390
560
  const currentMapping = this.executionContextState.mapping;
391
561
  const newMapping = this.activeMapping;
392
- if (newMapping && newMapping !== currentMapping) {
393
- this.changeMapping(newMapping, {
394
- keepQueryContent: true,
395
- });
396
- const classes = resolveUsableDataProductClasses(this.activeFeaturedElements, newMapping, this.graphManagerState, undefined);
397
- if (this.sourceClass && !classes.includes(this.sourceClass)) {
398
- this.setSourceElement(classes[0]);
562
+ if (!newMapping || newMapping === currentMapping) {
563
+ return;
564
+ }
565
+ const coverageResult = this.mappingToMappingCoverageResult?.get(newMapping.path);
566
+ if (coverageResult && this.dataProductArtifact) {
567
+ const origin = this.graphManagerState.graph.origin;
568
+ if (origin instanceof LegendSDLC) {
569
+ const newGraph = this.graphManagerState.createNewGraph();
570
+ const projectInfo = {
571
+ groupId: origin.groupId,
572
+ artifactId: origin.artifactId,
573
+ versionId: origin.versionId,
574
+ };
575
+ let accessPointId;
576
+ let dataProductAccessType;
577
+ if (this.executionState instanceof NativeModelDataProductExecutionState) {
578
+ accessPointId = this.executionState.exectionValue.key;
579
+ dataProductAccessType = DataProductAccessType.NATIVE;
580
+ }
581
+ else {
582
+ accessPointId = this.executionState.exectionValue.id;
583
+ dataProductAccessType = DataProductAccessType.MODEL;
584
+ }
585
+ const analysisResult = await this.graphManagerState.graphManager.buildDataProductAnalysis(this.dataProductArtifact, this.dataProduct.path, newGraph, accessPointId, dataProductAccessType, projectInfo);
586
+ this.graphManagerState.graph = newGraph;
587
+ this.dataProduct = newGraph.getDataProduct(this.dataProduct.path);
588
+ this.setExecutionState(analysisResult.targetExecState);
589
+ if (analysisResult.dataProductAnalysis.mappingToMappingCoverageResult) {
590
+ this.mappingToMappingCoverageResult =
591
+ analysisResult.dataProductAnalysis.mappingToMappingCoverageResult;
592
+ }
593
+ const newCoverageResult = this.mappingToMappingCoverageResult?.get(newMapping.path);
594
+ if (newCoverageResult) {
595
+ this.explorerState.mappingModelCoverageAnalysisResult =
596
+ newCoverageResult;
597
+ }
598
+ }
599
+ else {
600
+ this.explorerState.mappingModelCoverageAnalysisResult = coverageResult;
601
+ }
602
+ }
603
+ else if (coverageResult) {
604
+ this.explorerState.mappingModelCoverageAnalysisResult = coverageResult;
605
+ }
606
+ await this.prepareAccessForExecution();
607
+ this.changeMapping(newMapping, {
608
+ keepQueryContent: true,
609
+ });
610
+ const classes = resolveUsableDataProductClasses(this.activeFeaturedElements, newMapping, this.graphManagerState, this.explorerState.mappingModelCoverageAnalysisResult);
611
+ if (!this.sourceClass ||
612
+ (!classes.includes(this.sourceClass) && classes.length)) {
613
+ const possibleNewClass = classes[0];
614
+ if (possibleNewClass) {
615
+ this.changeSourceElement(possibleNewClass);
399
616
  }
400
617
  }
618
+ this.explorerState.refreshTreeData();
401
619
  }
402
620
  }
403
621
  //# sourceMappingURL=DataProductQueryBuilderState.js.map