@finos/legend-application-studio 28.6.0 → 28.7.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 (53) hide show
  1. package/lib/__lib__/LegendStudioDocumentation.d.ts +1 -0
  2. package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
  3. package/lib/__lib__/LegendStudioDocumentation.js +2 -0
  4. package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
  5. package/lib/components/editor/side-bar/ProjectOverview.d.ts.map +1 -1
  6. package/lib/components/editor/side-bar/ProjectOverview.js +17 -6
  7. package/lib/components/editor/side-bar/ProjectOverview.js.map +1 -1
  8. package/lib/components/editor/side-bar/WorkspaceReview.d.ts.map +1 -1
  9. package/lib/components/editor/side-bar/WorkspaceReview.js +23 -10
  10. package/lib/components/editor/side-bar/WorkspaceReview.js.map +1 -1
  11. package/lib/index.css +2 -2
  12. package/lib/index.css.map +1 -1
  13. package/lib/package.json +1 -1
  14. package/lib/stores/editor/EditorSDLCState.d.ts +8 -1
  15. package/lib/stores/editor/EditorSDLCState.d.ts.map +1 -1
  16. package/lib/stores/editor/EditorSDLCState.js +43 -2
  17. package/lib/stores/editor/EditorSDLCState.js.map +1 -1
  18. package/lib/stores/editor/EditorStore.d.ts.map +1 -1
  19. package/lib/stores/editor/EditorStore.js +2 -0
  20. package/lib/stores/editor/EditorStore.js.map +1 -1
  21. package/lib/stores/editor/NewElementState.d.ts.map +1 -1
  22. package/lib/stores/editor/NewElementState.js +0 -5
  23. package/lib/stores/editor/NewElementState.js.map +1 -1
  24. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
  25. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js +2 -1
  26. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
  27. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts +1 -1
  28. package/lib/stores/editor/sidebar-state/ProjectOverviewState.d.ts.map +1 -1
  29. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js +4 -4
  30. package/lib/stores/editor/sidebar-state/ProjectOverviewState.js.map +1 -1
  31. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts +2 -0
  32. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.d.ts.map +1 -1
  33. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js +10 -2
  34. package/lib/stores/editor/sidebar-state/WorkspaceReviewState.js.map +1 -1
  35. package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
  36. package/lib/stores/editor/utils/MockDataUtils.js +8 -4
  37. package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
  38. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.d.ts +1 -1
  39. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.d.ts.map +1 -1
  40. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.js +8 -5
  41. package/lib/stores/graph-modifier/DSL_Service_GraphModifierHelper.js.map +1 -1
  42. package/package.json +5 -5
  43. package/src/__lib__/LegendStudioDocumentation.ts +3 -0
  44. package/src/components/editor/side-bar/ProjectOverview.tsx +50 -13
  45. package/src/components/editor/side-bar/WorkspaceReview.tsx +35 -22
  46. package/src/stores/editor/EditorSDLCState.ts +61 -0
  47. package/src/stores/editor/EditorStore.ts +2 -0
  48. package/src/stores/editor/NewElementState.ts +0 -6
  49. package/src/stores/editor/editor-state/element-editor-state/service/ServiceRegistrationState.ts +4 -1
  50. package/src/stores/editor/sidebar-state/ProjectOverviewState.ts +4 -4
  51. package/src/stores/editor/sidebar-state/WorkspaceReviewState.ts +23 -1
  52. package/src/stores/editor/utils/MockDataUtils.ts +17 -3
  53. package/src/stores/graph-modifier/DSL_Service_GraphModifierHelper.ts +10 -7
@@ -56,6 +56,7 @@ import {
56
56
  Date as ColumnDate,
57
57
  SemiStructured,
58
58
  Json,
59
+ MILESTONING_VERSION_PROPERTY_SUFFIX,
59
60
  } from '@finos/legend-graph';
60
61
  import {
61
62
  CLASS_PROPERTY_TYPE,
@@ -116,10 +117,23 @@ export const createMockClassInstance = (
116
117
  depth = 0,
117
118
  ): PlainObject => {
118
119
  const properties = traverseNonRequiredProperties
119
- ? getAllClassProperties(_class)
120
- : getAllClassProperties(_class).filter((p) => p.multiplicity.lowerBound);
120
+ ? getAllClassProperties(_class, true)
121
+ : getAllClassProperties(_class, true).filter(
122
+ (p) => p.multiplicity.lowerBound,
123
+ );
124
+ const propertyNames = properties.map((property) => property.name);
125
+ const filteredProperties = properties.filter(
126
+ (prop) =>
127
+ prop.name.endsWith(MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS) ||
128
+ (!propertyNames.includes(
129
+ prop.name + MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS,
130
+ ) &&
131
+ !prop.name.endsWith(
132
+ MILESTONING_VERSION_PROPERTY_SUFFIX.ALL_VERSIONS_IN_RANGE,
133
+ )),
134
+ );
121
135
  const mockData: Record<string, object | string | number | boolean> = {};
122
- properties.forEach((property) => {
136
+ filteredProperties.forEach((property) => {
123
137
  const propertyType = property.genericType.value.rawType;
124
138
  let propertyMockData: PlainObject | string | number | boolean | undefined;
125
139
  switch (getClassPropertyType(propertyType)) {
@@ -162,12 +162,20 @@ export const service_deleteTestSuite = action(
162
162
  },
163
163
  );
164
164
 
165
+ export const service_setOwnership = action(
166
+ (service: Service, value: ServiceOwnership | undefined): void => {
167
+ service.ownership = value ? observe_Ownership(value) : undefined;
168
+ },
169
+ );
170
+
165
171
  export const service_initNewService = action(
166
172
  (service: Service, userId?: string): void => {
167
173
  service.pattern = `/${uuid()}`; // initialize the service pattern with an UUID to avoid people leaving the pattern as /
168
174
  if (userId) {
169
- service.ownership = new DeploymentOwnership('', service);
170
- } // this is used to add the current user as the first owner by default
175
+ service.owners = [userId];
176
+ } else {
177
+ service_setOwnership(service, new DeploymentOwnership('', service));
178
+ }
171
179
  },
172
180
  );
173
181
  export const service_setExecution = action(
@@ -185,11 +193,6 @@ export const service_setPattern = action(
185
193
  },
186
194
  );
187
195
 
188
- export const service_setOwnership = action(
189
- (service: Service, value: ServiceOwnership | undefined): void => {
190
- service.ownership = value ? observe_Ownership(value) : undefined;
191
- },
192
- );
193
196
  export const service_deploymentOwnership = action(
194
197
  (deployment: DeploymentOwnership, value: string): void => {
195
198
  deployment.identifier = value;