@jsonforms/core 3.4.0-alpha.1 → 3.4.0-alpha.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/lib/jsonforms-core.cjs.js +12 -5
- package/lib/jsonforms-core.cjs.js.map +1 -1
- package/lib/jsonforms-core.esm.js +12 -5
- package/lib/jsonforms-core.esm.js.map +1 -1
- package/lib/mappers/renderer.d.ts +1 -0
- package/lib/util/schema.d.ts +1 -1
- package/package.json +1 -1
- package/src/mappers/renderer.ts +3 -1
- package/src/util/schema.ts +21 -10
|
@@ -616,12 +616,18 @@ const isEnabled = (uischema, data, path = undefined, ajv) => {
|
|
|
616
616
|
};
|
|
617
617
|
|
|
618
618
|
const getFirstPrimitiveProp = (schema) => {
|
|
619
|
-
if (schema
|
|
619
|
+
if (schema &&
|
|
620
|
+
typeof schema === 'object' &&
|
|
621
|
+
'properties' in schema &&
|
|
622
|
+
schema.properties) {
|
|
620
623
|
return find(Object.keys(schema.properties), (propName) => {
|
|
621
624
|
const prop = schema.properties[propName];
|
|
622
|
-
return (prop
|
|
623
|
-
prop
|
|
624
|
-
|
|
625
|
+
return (prop &&
|
|
626
|
+
typeof prop === 'object' &&
|
|
627
|
+
'type' in prop &&
|
|
628
|
+
(prop.type === 'string' ||
|
|
629
|
+
prop.type === 'number' ||
|
|
630
|
+
prop.type === 'integer'));
|
|
625
631
|
});
|
|
626
632
|
}
|
|
627
633
|
return undefined;
|
|
@@ -1969,7 +1975,7 @@ const moveDown = (array, toMove) => {
|
|
|
1969
1975
|
};
|
|
1970
1976
|
const isRequired = (schema, schemaPath, rootSchema) => {
|
|
1971
1977
|
const pathSegments = schemaPath.split('/');
|
|
1972
|
-
const lastSegment = pathSegments[pathSegments.length - 1];
|
|
1978
|
+
const lastSegment = decode(pathSegments[pathSegments.length - 1]);
|
|
1973
1979
|
const nextHigherSchemaSegments = pathSegments.slice(0, pathSegments.length - 2);
|
|
1974
1980
|
const nextHigherSchemaPath = nextHigherSchemaSegments.join('/');
|
|
1975
1981
|
const nextHigherSchema = Resolve.schema(schema, nextHigherSchemaPath, rootSchema);
|
|
@@ -2399,6 +2405,7 @@ const mapStateToLabelProps = (state, props) => {
|
|
|
2399
2405
|
config: getConfig(state),
|
|
2400
2406
|
renderers: props.renderers || getRenderers(state),
|
|
2401
2407
|
cells: props.cells || getCells(state),
|
|
2408
|
+
uischema,
|
|
2402
2409
|
};
|
|
2403
2410
|
};
|
|
2404
2411
|
const computeChildLabel = (data, childPath, childLabelProp, schema, rootSchema, translateFct, uiSchema) => {
|