@finos/legend-application-studio 28.18.42 → 28.18.43

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ import {
28
28
  guaranteeType,
29
29
  type PlainObject,
30
30
  } from '@finos/legend-shared';
31
- import { makeObservable, action, flow, computed } from 'mobx';
31
+ import { makeObservable, action, flow, computed, observable } from 'mobx';
32
32
  import type { EditorStore } from '../../../EditorStore.js';
33
33
  import { ElementEditorState } from '../ElementEditorState.js';
34
34
  import { activator_setOwnership } from '../../../../graph-modifier/DSL_FunctionActivator_GraphModifierHelper.js';
@@ -54,6 +54,12 @@ export const OWNERSHIP_OPTIONS = [
54
54
  },
55
55
  ];
56
56
 
57
+ export enum ACTIVATOR_EDITOR_TAB {
58
+ DEFINITION = 'DEFINITION',
59
+ TAGGED_VALUES = 'TAGGED_VALUES',
60
+ STEREOTYPES = 'STEREOTYPES',
61
+ }
62
+
57
63
  export type HostedServiceOwnerOption = {
58
64
  label: string;
59
65
  value: string;
@@ -63,6 +69,8 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
63
69
  readonly validateState = ActionState.create();
64
70
  readonly deployState = ActionState.create();
65
71
 
72
+ selectedTab: ACTIVATOR_EDITOR_TAB;
73
+
66
74
  constructor(editorStore: EditorStore, element: HostedService) {
67
75
  super(editorStore, element);
68
76
 
@@ -74,11 +82,18 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
74
82
  setSelectedOwnership: action,
75
83
  selectedOwnership: computed,
76
84
  storeModel: action,
77
- generateLineage: action,
78
85
  validate: flow,
79
86
  deployToSandbox: flow,
80
87
  searchUsers: flow,
88
+ selectedTab: observable,
89
+ setSelectedTab: action,
81
90
  });
91
+
92
+ this.selectedTab = ACTIVATOR_EDITOR_TAB.DEFINITION;
93
+ }
94
+
95
+ setSelectedTab(tab: ACTIVATOR_EDITOR_TAB): void {
96
+ this.selectedTab = tab;
82
97
  }
83
98
 
84
99
  get activator(): HostedService {
@@ -103,10 +118,6 @@ export class HostedServiceFunctionActivatorEditorState extends ElementEditorStat
103
118
  this.activator.storeModel = val;
104
119
  }
105
120
 
106
- generateLineage(val: boolean): void {
107
- this.activator.generateLineage = val;
108
- }
109
-
110
121
  get selectedOwnership(): HostedServiceOwnerOption | undefined {
111
122
  const ownership = this.activator.ownership;
112
123
  if (ownership instanceof DeploymentOwner) {