ballerina-core 1.0.241 → 1.0.242

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ballerina-core",
3
3
  "author": "Dr. Giuseppe Maggiore",
4
4
  "private": false,
5
- "version": "1.0.241",
5
+ "version": "1.0.242",
6
6
  "main": "main.ts",
7
7
  "scripts": {
8
8
  "prettier": "prettier --write ."
@@ -71,16 +71,22 @@ export const CommonAbstractRendererState = {
71
71
  | RecordFieldRenderer<any>
72
72
  | TableCellRenderer<any>
73
73
  | Renderer<any>,
74
+ isUnionCase?: boolean,
75
+ caseName?: string,
74
76
  ) => {
75
77
  const actualRenderer = !("renderer" in renderer)
76
78
  ? renderer
77
79
  : renderer.renderer;
80
+ if (isUnionCase && caseName) {
81
+ return `${parentLabelContext}:${caseName}`;
82
+ }
78
83
  if (
79
84
  actualRenderer.kind == "lookupType-lookupRenderer" ||
80
85
  actualRenderer.kind == "inlinedType-lookupRenderer"
81
86
  ) {
82
87
  return actualRenderer.lookupRenderer;
83
88
  }
89
+
84
90
  return parentLabelContext;
85
91
  },
86
92
  },
@@ -66,6 +66,8 @@ export const UnionAbstractRenderer = <
66
66
  CommonAbstractRendererState.Operations.GetLabelContext(
67
67
  _.labelContext,
68
68
  CaseRenderers.get(caseName)!,
69
+ true,
70
+ caseName,
69
71
  );
70
72
  return {
71
73
  ...(_.caseFormStates.get(caseName)! ??
@@ -90,7 +90,7 @@ export const DispatchCreateFormLauncherTemplate = <
90
90
  extraContext: props.context.extraContext,
91
91
  remoteEntityVersionIdentifier:
92
92
  props.context.remoteEntityVersionIdentifier,
93
- domNodeAncestorPath: `[${props.context.formName}]`,
93
+ domNodeAncestorPath: "",
94
94
  labelContext: props.context.formName,
95
95
  lookupTypeAncestorNames: [],
96
96
  customPresentationContext: undefined,
@@ -89,7 +89,7 @@ export const DispatchEditFormLauncherTemplate = <
89
89
  extraContext: props.context.extraContext,
90
90
  remoteEntityVersionIdentifier:
91
91
  props.context.remoteEntityVersionIdentifier,
92
- domNodeAncestorPath: `[${props.context.formName}]`,
92
+ domNodeAncestorPath: "",
93
93
  labelContext: props.context.formName,
94
94
  lookupTypeAncestorNames: [],
95
95
  customPresentationContext: undefined,
@@ -108,7 +108,7 @@ export const DispatchPassthroughFormLauncherTemplate = <
108
108
  extraContext: props.context.extraContext,
109
109
  remoteEntityVersionIdentifier:
110
110
  props.context.remoteEntityVersionIdentifier,
111
- domNodeAncestorPath: `[${props.context.formName}]`,
111
+ domNodeAncestorPath: "",
112
112
  labelContext: props.context.formName,
113
113
  lookupTypeAncestorNames: [],
114
114
  customPresentationContext: undefined,