@koumoul/vjsf 3.15.2 → 3.15.3
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 +1 -1
- package/src/compat/v2.js +17 -1
- package/types/compat/v2.d.ts.map +1 -1
package/package.json
CHANGED
package/src/compat/v2.js
CHANGED
|
@@ -96,7 +96,23 @@ const processFragment = (schema, getJSONRef, schemaId, processed) => {
|
|
|
96
96
|
if (display === 'checkbox' && schema.type !== 'boolean') display = 'checkbox-group'
|
|
97
97
|
if (display === 'switch' && schema.type !== 'boolean') display = 'switch-group'
|
|
98
98
|
if (display === 'hidden') display = 'none'
|
|
99
|
-
|
|
99
|
+
if (schema.allOf && schema.properties) {
|
|
100
|
+
const children = []
|
|
101
|
+
for (const key of Object.keys(schema.properties)) {
|
|
102
|
+
children.push(key)
|
|
103
|
+
}
|
|
104
|
+
const allOfChild = {
|
|
105
|
+
comp: display,
|
|
106
|
+
children: /** @type string[] */([])
|
|
107
|
+
}
|
|
108
|
+
for (let i = 0; i < schema.allOf.length; i++) {
|
|
109
|
+
allOfChild.children.push('$allOf-' + i)
|
|
110
|
+
}
|
|
111
|
+
children.push(allOfChild)
|
|
112
|
+
layout.children = children
|
|
113
|
+
} else {
|
|
114
|
+
layout.comp = display
|
|
115
|
+
}
|
|
100
116
|
delete schema['x-display']
|
|
101
117
|
}
|
|
102
118
|
|
package/types/compat/v2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/compat/v2.js"],"names":[],"mappings":"AA4NA;;;;;;GAMG;AACH,kCALW,MAAM,2CAEN,MAAM,0BAoBhB;sBApPqB,KAAK"}
|