@json-layout/core 2.2.2 → 2.3.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-layout/core",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "description": "Compilation and state management utilities for JSON Layout.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "homepage": "https://github.com/json-layout/json-layout#readme",
78
78
  "peerDependencies": {
79
- "@json-layout/vocabulary": "^2.9.0"
79
+ "@json-layout/vocabulary": "^2.11.0"
80
80
  },
81
81
  "dependencies": {
82
82
  "ajv": "^8.17.1",
@@ -53,7 +53,7 @@ export function makeSkeletonNode (
53
53
  if (schema.$ref) {
54
54
  [refFragment, schemaId, refPointer] = getJSONRef(sourceSchemaId, schema.$ref)
55
55
  refFragment.__pointer = refPointer
56
- schema = { ...rawSchema, ...refFragment }
56
+ schema = { ...refFragment, ...rawSchema }
57
57
  if (errorMessage && refFragment.errorMessage) {
58
58
  // console.warn('errorMessage should not be defined both on ref source and target', pointer, errorMessage, refPointer, refFragment.errorMessage)
59
59
  // throw new Error('errorMessage cannot be defined both on ref source and target')
@@ -114,6 +114,8 @@ export function makeSkeletonNode (
114
114
  const prepareLayoutChild = (child) => {
115
115
  if (child.if) pushExpression(expressions, child.if)
116
116
  if (childIsCompositeCompObject(child)) {
117
+ if (child.props !== undefined && !child.getProps) child.getProps = { type: 'js-eval', expr: 'layout.props', pure: true, dataAlias: 'value' }
118
+ if (child.getProps) pushExpression(expressions, child.getProps)
117
119
  for (const grandChild of child.children) prepareLayoutChild(grandChild)
118
120
  }
119
121
  }
@@ -1 +1 @@
1
- {"version":3,"file":"skeleton-node.d.ts","sourceRoot":"","sources":["../../src/compile/skeleton-node.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,4CAlBW,GAAG,kBACH,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