@jsonforms/core 3.4.0-alpha.2 → 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 +11 -4
- package/lib/jsonforms-core.cjs.js.map +1 -1
- package/lib/jsonforms-core.esm.js +11 -4
- 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 +1 -0
- 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;
|
|
@@ -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) => {
|