@finos/legend-application-studio 28.19.117 → 28.20.0

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 (33) hide show
  1. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilder.d.ts +22 -0
  2. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilder.d.ts.map +1 -0
  3. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilder.js +43 -0
  4. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilder.js.map +1 -0
  5. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilderHelper.d.ts.map +1 -1
  6. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilderHelper.js +8 -16
  7. package/lib/components/editor/editor-group/accessor/AccessorQueryBuilderHelper.js.map +1 -1
  8. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
  9. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +111 -37
  10. package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
  11. package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.d.ts +3 -1
  12. package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.d.ts.map +1 -1
  13. package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.js +4 -5
  14. package/lib/components/editor/editor-group/uml-editor/ClassQueryBuilder.js.map +1 -1
  15. package/lib/index.css +2 -2
  16. package/lib/index.css.map +1 -1
  17. package/lib/package.json +1 -1
  18. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +2 -1
  19. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
  20. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +12 -4
  21. package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
  22. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +5 -1
  23. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
  24. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +12 -0
  25. package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
  26. package/package.json +9 -9
  27. package/src/components/editor/editor-group/accessor/AccessorQueryBuilder.tsx +81 -0
  28. package/src/components/editor/editor-group/accessor/{AccessorQueryBuilderHelper.ts → AccessorQueryBuilderHelper.tsx} +14 -1
  29. package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +225 -34
  30. package/src/components/editor/editor-group/uml-editor/ClassQueryBuilder.tsx +16 -6
  31. package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +14 -5
  32. package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +27 -0
  33. package/tsconfig.json +2 -1
@@ -63,6 +63,8 @@ import {
63
63
  DataProductDiagram,
64
64
  observe_DataProductDiagram,
65
65
  stub_Mapping,
66
+ AppDirOwner,
67
+ type AppDirNode,
66
68
  } from '@finos/legend-graph';
67
69
  import type { EditorStore } from '../../../EditorStore.js';
68
70
  import { ElementEditorState } from '../ElementEditorState.js';
@@ -1192,7 +1194,7 @@ export class DataProductEditorState extends ElementEditorState {
1192
1194
  this.ingestionManager,
1193
1195
  ).deployDataProduct(
1194
1196
  grammar,
1195
- guaranteeNonNullable(this.associatedIngest?.appDirDeployment),
1197
+ guaranteeNonNullable(this.appDirDeployment),
1196
1198
  (val: string) =>
1197
1199
  this.editorStore.applicationStore.alertService.setBlockingAlert({
1198
1200
  message: val,
@@ -1261,9 +1263,7 @@ export class DataProductEditorState extends ElementEditorState {
1261
1263
  }
1262
1264
 
1263
1265
  get validForDeployment(): boolean {
1264
- return Boolean(
1265
- this.associatedIngest?.appDirDeployment && this.ingestionManager,
1266
- );
1266
+ return Boolean(this.appDirDeployment && this.ingestionManager);
1267
1267
  }
1268
1268
 
1269
1269
  get accessPoints(): AccessPoint[] {
@@ -1275,7 +1275,7 @@ export class DataProductEditorState extends ElementEditorState {
1275
1275
  }
1276
1276
 
1277
1277
  get deployValidationMessage(): string {
1278
- if (!this.associatedIngest?.appDirDeployment) {
1278
+ if (!this.appDirDeployment) {
1279
1279
  return 'No app dir deployment found';
1280
1280
  } else if (!this.ingestionManager) {
1281
1281
  return 'No ingestion manager found';
@@ -1283,6 +1283,15 @@ export class DataProductEditorState extends ElementEditorState {
1283
1283
  return 'Deploy';
1284
1284
  }
1285
1285
 
1286
+ // Use explicit owner from the data product if available, otherwise fall back to the associated ingest's app dir deployment
1287
+ get appDirDeployment(): AppDirNode | undefined {
1288
+ const owner = this.product.owner;
1289
+ if (owner instanceof AppDirOwner) {
1290
+ return owner.production;
1291
+ }
1292
+ return this.associatedIngest?.appDirDeployment;
1293
+ }
1294
+
1286
1295
  // We need to get the associated Ingest to get the app dir deployment
1287
1296
  // We could do a more in depth check on the access point lambdas to check which ingest it uses but for now
1288
1297
  // we will assume all ingests have the same DID
@@ -43,6 +43,9 @@ import {
43
43
  DataProductOperationalMetadata,
44
44
  type DataProduct_DeliveryFrequency,
45
45
  type DataProduct_Region,
46
+ type DataProductOwner,
47
+ type AppDirOwner,
48
+ type AppDirNode,
46
49
  } from '@finos/legend-graph';
47
50
  import { addUniqueEntry, deleteEntry, swapEntry } from '@finos/legend-shared';
48
51
  import { action } from 'mobx';
@@ -409,3 +412,27 @@ export const operationalMetadata_deleteCoverageRegion = action(
409
412
  }
410
413
  },
411
414
  );
415
+
416
+ export const dataProduct_setOwner = action(
417
+ (product: DataProduct, owner: DataProductOwner | undefined) => {
418
+ product.owner = owner;
419
+ },
420
+ );
421
+
422
+ export const appDirOwner_setProduction = action(
423
+ (owner: AppDirOwner, appDirNode: AppDirNode | undefined) => {
424
+ owner.production = appDirNode;
425
+ },
426
+ );
427
+
428
+ export const appDirOwner_setProdParallel = action(
429
+ (owner: AppDirOwner, appDirNode: AppDirNode | undefined) => {
430
+ owner.prodParallel = appDirNode;
431
+ },
432
+ );
433
+
434
+ export const appDirNode_setAppDirId = action(
435
+ (node: AppDirNode, appDirId: number) => {
436
+ node.appDirId = appDirId;
437
+ },
438
+ );
package/tsconfig.json CHANGED
@@ -72,7 +72,6 @@
72
72
  "./src/application/LegendStudioApplicationConfig.ts",
73
73
  "./src/application/LegendStudioPluginManager.ts",
74
74
  "./src/components/__test-utils__/EmbeddedQueryBuilderTestUtils.ts",
75
- "./src/components/editor/editor-group/accessor/AccessorQueryBuilderHelper.ts",
76
75
  "./src/components/editor/editor-group/dataProduct/DataProductQueryBuilderHelper.ts",
77
76
  "./src/components/shared/StudioSDLCErrors.ts",
78
77
  "./src/stores/LegendStudioApplicationPlugin.ts",
@@ -248,6 +247,8 @@
248
247
  "./src/components/editor/editor-group/ProtocolValueBuilder.tsx",
249
248
  "./src/components/editor/editor-group/RuntimeEditor.tsx",
250
249
  "./src/components/editor/editor-group/UnsupportedElementEditor.tsx",
250
+ "./src/components/editor/editor-group/accessor/AccessorQueryBuilder.tsx",
251
+ "./src/components/editor/editor-group/accessor/AccessorQueryBuilderHelper.tsx",
251
252
  "./src/components/editor/editor-group/connection-editor/ConnectionEditor.tsx",
252
253
  "./src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx",
253
254
  "./src/components/editor/editor-group/connection-editor/DatabaseEditorHelper.tsx",