@chobantonov/jsonforms-extended-spec 0.3.0 → 1.0.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/conformance/authoring.json +243 -0
- package/conformance/behavior.json +1755 -22
- package/docs/audit.md +17 -2
- package/docs/conditional-fields.md +105 -16
- package/docs/external-resources-proposal.md +8 -2
- package/docs/implementation-guide.md +76 -89
- package/docs/implementation-pitfalls.md +260 -12
- package/docs/implementation-web-typescript.md +2 -5
- package/docs/renderer-and-demo.md +47 -34
- package/docs/spec.md +169 -47
- package/docs/todo.md +59 -22
- package/examples/catalog.json +16 -1
- package/examples/conditional-fields/README.md +10 -0
- package/examples/conditional-template-slots/README.md +14 -0
- package/examples/conditional-template-slots/config.json +7 -0
- package/examples/conditional-template-slots/data.json +5 -0
- package/examples/conditional-template-slots/schema.json +37 -0
- package/examples/conditional-template-slots/translations.json +16 -0
- package/examples/conditional-template-slots/uischema.json +22 -0
- package/examples/group-layout/README.md +26 -1
- package/examples/group-layout/uischema.json +50 -41
- package/examples/index.js +4 -3
- package/examples/kitchen-sink/README.md +93 -4
- package/examples/kitchen-sink/config.json +7 -0
- package/examples/kitchen-sink/data.json +14 -2
- package/examples/kitchen-sink/invalid-data.json +13 -1
- package/examples/kitchen-sink/schema.json +100 -1
- package/examples/kitchen-sink/translations.json +80 -2
- package/examples/kitchen-sink/uischema.json +239 -5
- package/examples/label-interpolation/README.md +17 -1
- package/examples/label-interpolation/translations.json +8 -4
- package/examples/label-interpolation/uischema.json +25 -6
- package/package.json +1 -1
- package/schemas/README.md +10 -0
- package/schemas/jsonforms-extended-uischema.schema.json +8 -18
- package/schemas/jsonforms-uischema.schema.json +8 -18
- package/typescript/README.md +6 -0
- package/typescript/lib/authoring/forSchema.d.ts +10 -6
- package/typescript/src/authoring/forSchema.ts +10 -6
- package/typescript/test/typedAuthoringCoverage.test.ts +15 -7
|
@@ -97,7 +97,10 @@ the inner.
|
|
|
97
97
|
## Cover, header and footer
|
|
98
98
|
|
|
99
99
|
The **Card regions** tab in `uischema.json` demonstrates the optional structural
|
|
100
|
-
regions
|
|
100
|
+
regions through direct `elements` children with `slot: "cover"`,
|
|
101
|
+
`slot: "header"` and `slot: "footer"`. The header uses a VerticalLayout; the
|
|
102
|
+
footer uses a HorizontalLayout for its labels and actions. No Group-level
|
|
103
|
+
`slots` mapping is needed, and unslotted children form the body. A self-contained courtyard photograph fills the 800px-wide card cover.
|
|
101
104
|
Two authored header Labels provide the title and smaller supporting text. The
|
|
102
105
|
footer follows the body with space on both sides of its divider.
|
|
103
106
|
The group starts
|
|
@@ -110,6 +113,28 @@ buttons use ordinary action dispatch and enabled/read-only behavior. The two
|
|
|
110
113
|
buttons select English or Bulgarian through the demo host's `setLocale` action.
|
|
111
114
|
The card's width limit comes from its parent VerticalLayout item constraint.
|
|
112
115
|
|
|
116
|
+
### Repeated and unknown slot names
|
|
117
|
+
|
|
118
|
+
Author one child per region, wrapping several items in a layout when needed.
|
|
119
|
+
If a region is assigned more than once, its first authored child fills it and
|
|
120
|
+
later matches stay in the body. An unknown name also stays in the body:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"type": "Group",
|
|
125
|
+
"elements": [
|
|
126
|
+
{ "type": "Label", "slot": "header", "text": "Heading" },
|
|
127
|
+
{ "type": "Label", "slot": "header", "text": "Body first" },
|
|
128
|
+
{ "type": "Label", "slot": "bottom", "text": "Body second" },
|
|
129
|
+
{ "type": "Label", "text": "Body third" }
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This produces one heading and three body elements, each rendered once. Hiding
|
|
135
|
+
the first header does not move the second Label out of the body. These are
|
|
136
|
+
portable acceptance expectations; renderer adapters must verify them.
|
|
137
|
+
|
|
113
138
|
## Not covered: `collapsed` driven from data
|
|
114
139
|
|
|
115
140
|
§8's worked example binds `collapsed` through `$dynamic`:
|