@json-layout/core 2.2.3 → 2.4.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 +2 -2
- package/src/compile/skeleton-node.js +2 -0
- package/src/state/options.js +2 -0
- package/src/state/state-node.js +2 -2
- package/src/utils/doc-options.js +10 -0
- package/types/compile/skeleton-node.d.ts.map +1 -1
- package/types/state/options.d.ts.map +1 -1
- package/types/utils/doc-options.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@json-layout/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.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.
|
|
79
|
+
"@json-layout/vocabulary": "^2.12.0"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"ajv": "^8.17.1",
|
|
@@ -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
|
}
|
package/src/state/options.js
CHANGED
package/src/state/state-node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isSwitchStruct, childIsCompositeCompObject, childIsSlotCompObject, isCompositeLayout, isFocusableLayout, isItemsLayout, isGetItemsExpression, isGetItemsFetch, isListLayout } from '@json-layout/vocabulary'
|
|
2
2
|
import { produce } from 'immer'
|
|
3
3
|
import debug from 'debug'
|
|
4
|
-
import { getChildDisplay } from './utils/display.js'
|
|
4
|
+
import { Display, getChildDisplay } from './utils/display.js'
|
|
5
5
|
import { shallowEqualArray, shallowProduceArray, shallowProduceObject } from './utils/immutable.js'
|
|
6
6
|
import { getRegexp } from './utils/regexps.js'
|
|
7
7
|
import { pathURL } from './utils/urls.js'
|
|
@@ -734,7 +734,7 @@ export function createStateNode (
|
|
|
734
734
|
dataPath,
|
|
735
735
|
childSkeleton,
|
|
736
736
|
null,
|
|
737
|
-
|
|
737
|
+
new Display(layout.listEditMode === 'menu' ? options.listMenuWidth : options.listDialogWidth),
|
|
738
738
|
arrayData[i],
|
|
739
739
|
{ parent: parentContext, data: arrayData },
|
|
740
740
|
validationState,
|
package/src/utils/doc-options.js
CHANGED
|
@@ -217,5 +217,15 @@ export const runtimeOptions = [
|
|
|
217
217
|
{
|
|
218
218
|
key: 'fetchOptions',
|
|
219
219
|
description: 'Define options to be given to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch">fetch</a> when getting data items from a URL. Can also be a function that will accept a URL object as parameter and return those options.'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
key: 'listDialogOptions',
|
|
223
|
+
description: 'The width in pixels of list item edition dialogs.',
|
|
224
|
+
default: 500
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
key: 'listMenuOptions',
|
|
228
|
+
description: 'The width in pixels of list item edition menus.',
|
|
229
|
+
default: 500
|
|
220
230
|
}
|
|
221
231
|
]
|
|
@@ -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,MAAM,WACN,OAAO,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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/state/options.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,OAAO,CAAC,qBAAqB,CAAC,kBAC9B,OAAO,aAAa,EAAE,cAAc,GAClC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/state/options.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,4CAJW,OAAO,CAAC,qBAAqB,CAAC,kBAC9B,OAAO,aAAa,EAAE,cAAc,GAClC,qBAAqB,CAiCjC;oCAvCY,OAAO,YAAY,EAAE,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doc-options.d.ts","sourceRoot":"","sources":["../../src/utils/doc-options.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH,yBAAyB;AACzB,6BADW,UAAU,CAiGpB;AAED,yBAAyB;AACzB,6BADW,UAAU,
|
|
1
|
+
{"version":3,"file":"doc-options.d.ts","sourceRoot":"","sources":["../../src/utils/doc-options.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH,yBAAyB;AACzB,6BADW,UAAU,CAiGpB;AAED,yBAAyB;AACzB,6BADW,UAAU,CA6HpB;yBAnOY;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAC,EAAE"}
|