ballerina-core 1.0.10 → 1.0.11
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
|
@@ -97,6 +97,7 @@ export type ParsedForm = {
|
|
|
97
97
|
export const ParseForm = (
|
|
98
98
|
formDef: FormDef,
|
|
99
99
|
containerFormView: any,
|
|
100
|
+
nestedContainerFormView: any,
|
|
100
101
|
fieldViews: any,
|
|
101
102
|
otherForms: ParsedForms,
|
|
102
103
|
fieldsViewsConfig: any,
|
|
@@ -152,7 +153,7 @@ export const ParseForm = (
|
|
|
152
153
|
const viewName = (fieldsViewsConfig as any)[fieldName];
|
|
153
154
|
const otherForm = otherForms.get(viewName)
|
|
154
155
|
if (otherForm != undefined) {
|
|
155
|
-
formConfig[fieldName] = otherForm.form.withView(
|
|
156
|
+
formConfig[fieldName] = otherForm.form.withView(nestedContainerFormView).mapContext<any>(_ => ({ ..._, label: label }))
|
|
156
157
|
} else {
|
|
157
158
|
const viewType = fieldNameToViewCategory(fieldName) as any
|
|
158
159
|
if (viewType == "ListViews") {
|
|
@@ -166,7 +167,7 @@ export const ParseForm = (
|
|
|
166
167
|
{ Default: () => ({ ...initialFormState }) },
|
|
167
168
|
{ Default: () => ({ ...initialElementValue }) },
|
|
168
169
|
_ => PromiseRepo.Default.mock(() => []),
|
|
169
|
-
elementForm.form.withView(
|
|
170
|
+
elementForm.form.withView(nestedContainerFormView)
|
|
170
171
|
).withView(((fieldViews as any)[viewType] as any)[viewName]() as any)
|
|
171
172
|
.mapContext<any>(_ => ({ ..._, label: label }))
|
|
172
173
|
} else { // the list argument is a primitive
|
|
@@ -311,6 +312,7 @@ export const parseForms =
|
|
|
311
312
|
<LeafPredicates,>(
|
|
312
313
|
builtIns: BuiltIns,
|
|
313
314
|
containerFormView: any,
|
|
315
|
+
nestedContainerFormView: any,
|
|
314
316
|
fieldViews: any,
|
|
315
317
|
infiniteStreamSources: InfiniteStreamSources,
|
|
316
318
|
enumOptionsSources: EnumOptionsSources,
|
|
@@ -384,6 +386,7 @@ export const parseForms =
|
|
|
384
386
|
const parsedForm = ParseForm(
|
|
385
387
|
formConfig,
|
|
386
388
|
containerFormView,
|
|
389
|
+
nestedContainerFormView,
|
|
387
390
|
fieldViews,
|
|
388
391
|
parsedForms,
|
|
389
392
|
formFieldRenderers,
|
|
@@ -497,6 +500,7 @@ export const parseForms =
|
|
|
497
500
|
|
|
498
501
|
export type FormsParserContext = {
|
|
499
502
|
containerFormView: any,
|
|
503
|
+
nestedContainerFormView: any,
|
|
500
504
|
fieldViews: any,
|
|
501
505
|
infiniteStreamSources: InfiniteStreamSources,
|
|
502
506
|
enumOptionsSources: EnumOptionsSources,
|