@chobantonov/jsonforms-extended-spec 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +126 -2
- package/conformance/authoring.json +2169 -0
- package/conformance/behavior.json +731 -0
- package/conformance/config-consumption.json +1531 -0
- package/conformance/expected-invalid.json +20 -0
- package/docs/audit.md +150 -0
- package/docs/conditional-fields.md +80 -0
- package/docs/draft-07-visual-support.md +43 -0
- package/docs/external-resources-proposal.md +536 -0
- package/docs/implementation-guide.md +180 -0
- package/docs/implementation-pitfalls.md +802 -0
- package/docs/implementation-web-typescript.md +41 -0
- package/docs/renderer-and-demo.md +1347 -0
- package/docs/renderer-selection.md +99 -0
- package/docs/spec.md +8321 -0
- package/docs/todo.md +149 -0
- package/examples/README.md +121 -0
- package/examples/additional-errors/README.md +169 -0
- package/examples/additional-errors/config.json +3 -0
- package/examples/additional-errors/data.json +11 -0
- package/examples/additional-errors/schema.json +56 -0
- package/examples/additional-errors/translations.json +64 -0
- package/examples/additional-errors/uischema.json +158 -0
- package/examples/additional-items-pagination/README.md +8 -0
- package/examples/additional-items-pagination/config.json +10 -0
- package/examples/additional-items-pagination/data.json +22 -0
- package/examples/additional-items-pagination/schema.json +30 -0
- package/examples/additional-items-pagination/translations.json +16 -0
- package/examples/additional-items-pagination/uischema.json +39 -0
- package/examples/additional-properties/README.md +188 -0
- package/examples/additional-properties/config.json +5 -0
- package/examples/additional-properties/data.json +31 -0
- package/examples/additional-properties/schema.json +78 -0
- package/examples/additional-properties/translations.json +80 -0
- package/examples/additional-properties/uischema.json +104 -0
- package/examples/ag-grid/README.md +62 -0
- package/examples/ag-grid/config.json +14 -0
- package/examples/ag-grid/data.json +124 -0
- package/examples/ag-grid/schema.json +48 -0
- package/examples/ag-grid/translations.json +58 -0
- package/examples/ag-grid/uischema.json +671 -0
- package/examples/array-choices/README.md +150 -0
- package/examples/array-choices/config.json +4 -0
- package/examples/array-choices/data.json +10 -0
- package/examples/array-choices/schema.json +68 -0
- package/examples/array-choices/translations.json +64 -0
- package/examples/array-choices/uischema.json +97 -0
- package/examples/array-controls/README.md +237 -0
- package/examples/array-controls/config.json +4 -0
- package/examples/array-controls/data.json +147 -0
- package/examples/array-controls/schema.json +374 -0
- package/examples/array-controls/translations.json +186 -0
- package/examples/array-controls/uischema.json +685 -0
- package/examples/array-detail-modes/README.md +11 -0
- package/examples/array-detail-modes/data.json +38 -0
- package/examples/array-detail-modes/schema.json +89 -0
- package/examples/array-detail-modes/translations.json +36 -0
- package/examples/array-detail-modes/uischema.json +73 -0
- package/examples/array-detail-modes/uischemas.d.mts +2 -0
- package/examples/array-detail-modes/uischemas.json +15 -0
- package/examples/boolean-controls/README.md +109 -0
- package/examples/boolean-controls/config.json +3 -0
- package/examples/boolean-controls/data.json +27 -0
- package/examples/boolean-controls/schema.json +98 -0
- package/examples/boolean-controls/translations.json +94 -0
- package/examples/boolean-controls/uischema.json +126 -0
- package/examples/button-actions/README.md +259 -0
- package/examples/button-actions/config.json +7 -0
- package/examples/button-actions/data.json +5 -0
- package/examples/button-actions/host.mjs +14 -0
- package/examples/button-actions/schema.json +20 -0
- package/examples/button-actions/translations.json +60 -0
- package/examples/button-actions/uischema.json +179 -0
- package/examples/catalog.json +634 -0
- package/examples/categorization/README.md +132 -0
- package/examples/categorization/config.json +7 -0
- package/examples/categorization/data.json +8 -0
- package/examples/categorization/schema.json +29 -0
- package/examples/categorization/translations.json +72 -0
- package/examples/categorization/uischema.json +288 -0
- package/examples/choice-controls/README.md +136 -0
- package/examples/choice-controls/config.json +10 -0
- package/examples/choice-controls/data.json +61 -0
- package/examples/choice-controls/schema.json +406 -0
- package/examples/choice-controls/translations.json +154 -0
- package/examples/choice-controls/uischema.json +575 -0
- package/examples/choice-controls/uischemas.d.mts +2 -0
- package/examples/choice-controls/uischemas.json +16 -0
- package/examples/code-editor/README.md +74 -0
- package/examples/code-editor/data.json +8 -0
- package/examples/code-editor/schema.json +28 -0
- package/examples/code-editor/translations.json +20 -0
- package/examples/code-editor/uischema.json +77 -0
- package/examples/collection-pagination/README.md +5 -0
- package/examples/collection-pagination/config.json +1 -0
- package/examples/collection-pagination/data.json +64 -0
- package/examples/collection-pagination/schema.json +23 -0
- package/examples/collection-pagination/translations.json +14 -0
- package/examples/collection-pagination/uischema.json +14 -0
- package/examples/color-control/README.md +151 -0
- package/examples/color-control/config.json +7 -0
- package/examples/color-control/data.json +11 -0
- package/examples/color-control/schema.json +61 -0
- package/examples/color-control/translations.json +76 -0
- package/examples/color-control/uischema.json +106 -0
- package/examples/combinators/README.md +223 -0
- package/examples/combinators/config.json +9 -0
- package/examples/combinators/data.json +23 -0
- package/examples/combinators/schema.json +232 -0
- package/examples/combinators/translations.json +178 -0
- package/examples/combinators/uischema.json +158 -0
- package/examples/conditional-fields/README.md +19 -0
- package/examples/conditional-fields/config.json +5 -0
- package/examples/conditional-fields/data.json +7 -0
- package/examples/conditional-fields/schema.json +59 -0
- package/examples/conditional-fields/translations.json +30 -0
- package/examples/conditional-fields/uischema.json +71 -0
- package/examples/container-validation-indicator/README.md +187 -0
- package/examples/container-validation-indicator/config.json +9 -0
- package/examples/container-validation-indicator/data.json +68 -0
- package/examples/container-validation-indicator/schema.json +222 -0
- package/examples/container-validation-indicator/translations.json +120 -0
- package/examples/container-validation-indicator/uischema.json +98 -0
- package/examples/cron-control/README.md +155 -0
- package/examples/cron-control/data.json +15 -0
- package/examples/cron-control/schema.json +72 -0
- package/examples/cron-control/translations.json +80 -0
- package/examples/cron-control/uischema.json +91 -0
- package/examples/destructive-confirmation/README.md +210 -0
- package/examples/destructive-confirmation/config.json +17 -0
- package/examples/destructive-confirmation/data.json +86 -0
- package/examples/destructive-confirmation/schema.json +204 -0
- package/examples/destructive-confirmation/translations.json +112 -0
- package/examples/destructive-confirmation/uischema.json +105 -0
- package/examples/draft-07-metaschema/README.md +11 -0
- package/examples/draft-07-metaschema/config.json +3 -0
- package/examples/draft-07-metaschema/data.json +25 -0
- package/examples/draft-07-metaschema/schema.json +172 -0
- package/examples/draft-07-metaschema/translations.json +10 -0
- package/examples/draft-07-metaschema/uischema.json +14 -0
- package/examples/dynamic-playground/README.md +95 -0
- package/examples/dynamic-playground/config.json +8 -0
- package/examples/dynamic-playground/configuration.json +152 -0
- package/examples/dynamic-playground/data.json +15 -0
- package/examples/dynamic-playground/dynamic-uischema.json +379 -0
- package/examples/dynamic-playground/host.mjs +37 -0
- package/examples/dynamic-playground/schema.json +48 -0
- package/examples/dynamic-playground/translations.json +76 -0
- package/examples/dynamic-playground/uischema.json +36 -0
- package/examples/editor-details/README.md +10 -0
- package/examples/editor-details/data.json +18 -0
- package/examples/editor-details/schema.json +49 -0
- package/examples/editor-details/translations.json +28 -0
- package/examples/editor-details/uischema.json +53 -0
- package/examples/editor-details/uischemas.d.mts +2 -0
- package/examples/editor-details/uischemas.json +14 -0
- package/examples/file-control/README.md +108 -0
- package/examples/file-control/data.json +28 -0
- package/examples/file-control/schema.json +89 -0
- package/examples/file-control/translations.json +46 -0
- package/examples/file-control/uischema.json +152 -0
- package/examples/group-layout/README.md +149 -0
- package/examples/group-layout/config.json +10 -0
- package/examples/group-layout/data.json +9 -0
- package/examples/group-layout/schema.json +51 -0
- package/examples/group-layout/translations.json +62 -0
- package/examples/group-layout/uischema.json +249 -0
- package/examples/index.d.ts +17 -0
- package/examples/index.js +69 -0
- package/examples/input-adornments/README.md +68 -0
- package/examples/input-adornments/data.json +41 -0
- package/examples/input-adornments/schema.json +207 -0
- package/examples/input-adornments/translations.json +106 -0
- package/examples/input-adornments/uischema.json +695 -0
- package/examples/job-application/README.md +23 -0
- package/examples/job-application/config.json +10 -0
- package/examples/job-application/data.json +68 -0
- package/examples/job-application/schema.json +196 -0
- package/examples/job-application/translations.json +388 -0
- package/examples/job-application/uischema.json +218 -0
- package/examples/job-application/uischemas.json +153 -0
- package/examples/json-editor/README.md +28 -0
- package/examples/json-editor/schema.json +1 -0
- package/examples/json-editor/translations.json +10 -0
- package/examples/json-editor/uischema.json +16 -0
- package/examples/json-inference/README.md +33 -0
- package/examples/json-inference/translations.json +10 -0
- package/examples/json-inference/uischema.json +16 -0
- package/examples/kitchen-sink/README.md +86 -0
- package/examples/kitchen-sink/config.json +14 -0
- package/examples/kitchen-sink/data.json +263 -0
- package/examples/kitchen-sink/invalid-data.json +263 -0
- package/examples/kitchen-sink/schema.json +515 -0
- package/examples/kitchen-sink/translations.json +270 -0
- package/examples/kitchen-sink/uischema.json +722 -0
- package/examples/label-interpolation/README.md +200 -0
- package/examples/label-interpolation/config.json +8 -0
- package/examples/label-interpolation/data.json +13 -0
- package/examples/label-interpolation/schema.json +64 -0
- package/examples/label-interpolation/translations.json +94 -0
- package/examples/label-interpolation/uischema.json +375 -0
- package/examples/layout-sizing/README.md +162 -0
- package/examples/layout-sizing/config.json +10 -0
- package/examples/layout-sizing/data.json +14 -0
- package/examples/layout-sizing/schema.json +58 -0
- package/examples/layout-sizing/translations.json +42 -0
- package/examples/layout-sizing/uischema.json +558 -0
- package/examples/markup-label/README.md +109 -0
- package/examples/markup-label/config.json +16 -0
- package/examples/markup-label/data.json +5 -0
- package/examples/markup-label/schema.json +24 -0
- package/examples/markup-label/translations.json +40 -0
- package/examples/markup-label/uischema.json +149 -0
- package/examples/mixed-control/README.md +164 -0
- package/examples/mixed-control/config.json +11 -0
- package/examples/mixed-control/data.json +70 -0
- package/examples/mixed-control/schema.json +221 -0
- package/examples/mixed-control/translations.json +158 -0
- package/examples/mixed-control/uischema.json +211 -0
- package/examples/null-control/README.md +111 -0
- package/examples/null-control/config.json +4 -0
- package/examples/null-control/data.json +6 -0
- package/examples/null-control/schema.json +36 -0
- package/examples/null-control/translations.json +42 -0
- package/examples/null-control/uischema.json +56 -0
- package/examples/numeric-controls/README.md +94 -0
- package/examples/numeric-controls/config.json +4 -0
- package/examples/numeric-controls/data.json +8 -0
- package/examples/numeric-controls/schema.json +52 -0
- package/examples/numeric-controls/translations.json +56 -0
- package/examples/numeric-controls/uischema.json +77 -0
- package/examples/object-control/README.md +220 -0
- package/examples/object-control/config.json +4 -0
- package/examples/object-control/data.json +62 -0
- package/examples/object-control/schema.json +252 -0
- package/examples/object-control/translations.json +160 -0
- package/examples/object-control/uischema.json +275 -0
- package/examples/object-control/uischemas.d.mts +2 -0
- package/examples/object-control/uischemas.json +59 -0
- package/examples/password-control/README.md +119 -0
- package/examples/password-control/config.json +3 -0
- package/examples/password-control/data.json +18 -0
- package/examples/password-control/schema.json +65 -0
- package/examples/password-control/translations.json +64 -0
- package/examples/password-control/uischema.json +94 -0
- package/examples/pre-touch-errors/README.md +176 -0
- package/examples/pre-touch-errors/config.json +4 -0
- package/examples/pre-touch-errors/data.json +5 -0
- package/examples/pre-touch-errors/schema.json +56 -0
- package/examples/pre-touch-errors/translations.json +68 -0
- package/examples/pre-touch-errors/uischema.json +85 -0
- package/examples/presentation/README.md +148 -0
- package/examples/presentation/config.json +9 -0
- package/examples/presentation/data.json +6 -0
- package/examples/presentation/schema.json +21 -0
- package/examples/presentation/translations.json +64 -0
- package/examples/presentation/uischema.json +210 -0
- package/examples/property-pagination/README.md +5 -0
- package/examples/property-pagination/config.json +1 -0
- package/examples/property-pagination/data.json +17 -0
- package/examples/property-pagination/schema.json +14 -0
- package/examples/property-pagination/translations.json +10 -0
- package/examples/property-pagination/uischema.json +24 -0
- package/examples/recursive-tree/README.md +49 -0
- package/examples/recursive-tree/config.json +1 -0
- package/examples/recursive-tree/data.json +40 -0
- package/examples/recursive-tree/schema.json +89 -0
- package/examples/recursive-tree/translations.json +42 -0
- package/examples/recursive-tree/uischema.json +84 -0
- package/examples/recursive-tree/uischemas.d.mts +2 -0
- package/examples/recursive-tree/uischemas.json +51 -0
- package/examples/split-layout/README.md +123 -0
- package/examples/split-layout/config.json +3 -0
- package/examples/split-layout/data.json +13 -0
- package/examples/split-layout/schema.json +50 -0
- package/examples/split-layout/translations.json +50 -0
- package/examples/split-layout/uischema.json +204 -0
- package/examples/string-controls/README.md +159 -0
- package/examples/string-controls/config.json +5 -0
- package/examples/string-controls/data.json +13 -0
- package/examples/string-controls/schema.json +70 -0
- package/examples/string-controls/translations.json +76 -0
- package/examples/string-controls/uischema.json +148 -0
- package/examples/table-row-details/README.md +69 -0
- package/examples/table-row-details/config.json +7 -0
- package/examples/table-row-details/data.json +280 -0
- package/examples/table-row-details/schema.json +61 -0
- package/examples/table-row-details/translations.json +56 -0
- package/examples/table-row-details/uischema.json +1303 -0
- package/examples/template-layout/README.md +250 -0
- package/examples/template-layout/config.json +9 -0
- package/examples/template-layout/data.json +20 -0
- package/examples/template-layout/host.mjs +13 -0
- package/examples/template-layout/schema.json +48 -0
- package/examples/template-layout/translations.json +70 -0
- package/examples/template-layout/uischema.json +177 -0
- package/examples/template-slots/README.md +19 -0
- package/examples/template-slots/data.json +4 -0
- package/examples/template-slots/schema.json +11 -0
- package/examples/template-slots/translations.json +26 -0
- package/examples/template-slots/uischema.json +47 -0
- package/examples/template-slots/uischemas.d.mts +2 -0
- package/examples/template-slots/uischemas.json +56 -0
- package/examples/temporal-controls/README.md +325 -0
- package/examples/temporal-controls/data.json +44 -0
- package/examples/temporal-controls/schema.json +208 -0
- package/examples/temporal-controls/translations.json +156 -0
- package/examples/temporal-controls/uischema.json +297 -0
- package/examples/tree-max-depth/README.md +5 -0
- package/examples/tree-max-depth/config.json +3 -0
- package/examples/tree-max-depth/data.json +31 -0
- package/examples/tree-max-depth/schema.json +258 -0
- package/examples/tree-max-depth/translations.json +42 -0
- package/examples/tree-max-depth/uischema.json +16 -0
- package/examples/tree-max-depth/uischemas.d.mts +2 -0
- package/examples/tree-max-depth/uischemas.json +50 -0
- package/examples/tuple-control/README.md +335 -0
- package/examples/tuple-control/config.json +4 -0
- package/examples/tuple-control/data.json +61 -0
- package/examples/tuple-control/schema.json +218 -0
- package/examples/tuple-control/translations.json +142 -0
- package/examples/tuple-control/uischema.json +128 -0
- package/examples/tuple-control/uischemas.d.mts +2 -0
- package/examples/tuple-control/uischemas.json +125 -0
- package/examples/validator-profile/README.md +197 -0
- package/examples/validator-profile/config.json +9 -0
- package/examples/validator-profile/data.json +16 -0
- package/examples/validator-profile/schema.json +139 -0
- package/examples/validator-profile/translations.json +34 -0
- package/examples/validator-profile/uischema.json +59 -0
- package/package.json +83 -3
- package/provenance.json +140 -0
- package/schemas/README.md +77 -0
- package/schemas/example.schema.json +37 -0
- package/schemas/jsonforms-config.schema.json +427 -0
- package/schemas/jsonforms-dynamic-uischema.schema.json +220 -0
- package/schemas/jsonforms-extended-config.schema.json +327 -0
- package/schemas/jsonforms-extended-uischema.schema.json +1923 -0
- package/schemas/jsonforms-rule.schema.json +104 -0
- package/schemas/jsonforms-uischema.schema.json +1421 -0
- package/typescript/README.md +540 -0
- package/typescript/lib/authoring/cssLength.d.ts +33 -0
- package/typescript/lib/authoring/cssLength.js +25 -0
- package/typescript/lib/authoring/dynamic.d.ts +73 -0
- package/typescript/lib/authoring/dynamic.js +8 -0
- package/typescript/lib/authoring/forSchema.d.ts +376 -0
- package/typescript/lib/authoring/forSchema.js +84 -0
- package/typescript/lib/authoring/schemaTypes.d.ts +111 -0
- package/typescript/lib/authoring/schemaTypes.js +15 -0
- package/typescript/lib/index.d.ts +4 -0
- package/typescript/lib/index.js +20 -0
- package/typescript/package.json +1 -0
- package/typescript/src/authoring/cssLength.ts +79 -0
- package/typescript/src/authoring/dynamic.ts +96 -0
- package/typescript/src/authoring/forSchema.ts +419 -0
- package/typescript/src/authoring/schemaTypes.ts +143 -0
- package/typescript/src/index.ts +4 -0
- package/typescript/test/schemaContract.test.ts +626 -0
- package/typescript/test/tsconfig.json +10 -0
- package/typescript/test/typedAuthoring.test.ts +140 -0
- package/typescript/test/typedAuthoringCoverage.test.ts +145 -0
- package/typescript/test/typedAuthoringCssLength.test.ts +81 -0
- package/typescript/test/typedAuthoringNames.test.ts +90 -0
- package/typescript/test/typedDynamic.test.ts +88 -0
- package/typescript/tsconfig.json +15 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "VerticalLayout",
|
|
3
|
+
"options": {
|
|
4
|
+
"gap": "1.5rem"
|
|
5
|
+
},
|
|
6
|
+
"elements": [
|
|
7
|
+
{
|
|
8
|
+
"type": "Categorization",
|
|
9
|
+
"elements": [
|
|
10
|
+
{
|
|
11
|
+
"type": "Category",
|
|
12
|
+
"label": "Span",
|
|
13
|
+
"i18n": "featureNavigation.section1",
|
|
14
|
+
"elements": [
|
|
15
|
+
{
|
|
16
|
+
"type": "Label",
|
|
17
|
+
"text": "Span: shares of a 16-column grid"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "HorizontalLayout",
|
|
21
|
+
"elements": [
|
|
22
|
+
{
|
|
23
|
+
"type": "Control",
|
|
24
|
+
"scope": "#/properties/reference",
|
|
25
|
+
"options": {
|
|
26
|
+
"layout": {
|
|
27
|
+
"span": 4
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "Control",
|
|
33
|
+
"scope": "#/properties/supplier",
|
|
34
|
+
"options": {
|
|
35
|
+
"layout": {
|
|
36
|
+
"span": 8
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "Control",
|
|
42
|
+
"scope": "#/properties/weightKg",
|
|
43
|
+
"options": {
|
|
44
|
+
"layout": {
|
|
45
|
+
"span": 4
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "Category",
|
|
55
|
+
"label": "Weight",
|
|
56
|
+
"i18n": "featureNavigation.section2",
|
|
57
|
+
"elements": [
|
|
58
|
+
{
|
|
59
|
+
"type": "Label",
|
|
60
|
+
"text": "Weight: shares of what is left over"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "HorizontalLayout",
|
|
64
|
+
"elements": [
|
|
65
|
+
{
|
|
66
|
+
"type": "Control",
|
|
67
|
+
"scope": "#/properties/origin",
|
|
68
|
+
"options": {
|
|
69
|
+
"layout": {
|
|
70
|
+
"weight": 2
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "Control",
|
|
76
|
+
"scope": "#/properties/destination",
|
|
77
|
+
"options": {
|
|
78
|
+
"layout": {
|
|
79
|
+
"weight": 2
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "Control",
|
|
85
|
+
"scope": "#/properties/priority",
|
|
86
|
+
"options": {
|
|
87
|
+
"layout": {
|
|
88
|
+
"weight": 1
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "Category",
|
|
98
|
+
"label": "Sizing precedence",
|
|
99
|
+
"i18n": "featureNavigation.section3",
|
|
100
|
+
"elements": [
|
|
101
|
+
{
|
|
102
|
+
"type": "Label",
|
|
103
|
+
"text": "Fixed beats span beats weight; min and max constrain"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "HorizontalLayout",
|
|
107
|
+
"options": {
|
|
108
|
+
"align": "start",
|
|
109
|
+
"minItemWidth": 120
|
|
110
|
+
},
|
|
111
|
+
"elements": [
|
|
112
|
+
{
|
|
113
|
+
"type": "Control",
|
|
114
|
+
"scope": "#/properties/priority",
|
|
115
|
+
"options": {
|
|
116
|
+
"layout": {
|
|
117
|
+
"width": 180
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "Control",
|
|
123
|
+
"scope": "#/properties/notes",
|
|
124
|
+
"options": {
|
|
125
|
+
"layout": {
|
|
126
|
+
"weight": 1,
|
|
127
|
+
"maxWidth": "32rem"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "Category",
|
|
137
|
+
"label": "Hidden children",
|
|
138
|
+
"i18n": "featureNavigation.section4",
|
|
139
|
+
"elements": [
|
|
140
|
+
{
|
|
141
|
+
"type": "Label",
|
|
142
|
+
"text": "A hidden child leaves layout entirely"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"type": "HorizontalLayout",
|
|
146
|
+
"elements": [
|
|
147
|
+
{
|
|
148
|
+
"type": "Control",
|
|
149
|
+
"scope": "#/properties/needsApproval"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "Control",
|
|
153
|
+
"scope": "#/properties/approvalCode",
|
|
154
|
+
"rule": {
|
|
155
|
+
"effect": "SHOW",
|
|
156
|
+
"condition": {
|
|
157
|
+
"scope": "#/properties/needsApproval",
|
|
158
|
+
"schema": {
|
|
159
|
+
"const": true
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "Category",
|
|
170
|
+
"label": "Spacer",
|
|
171
|
+
"i18n": "featureNavigation.section5",
|
|
172
|
+
"elements": [
|
|
173
|
+
{
|
|
174
|
+
"type": "Label",
|
|
175
|
+
"text": "Spacer takes the parent's main axis"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "HorizontalLayout",
|
|
179
|
+
"elements": [
|
|
180
|
+
{
|
|
181
|
+
"type": "Control",
|
|
182
|
+
"scope": "#/properties/origin",
|
|
183
|
+
"options": {
|
|
184
|
+
"layout": {
|
|
185
|
+
"span": 5
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"type": "Spacer",
|
|
191
|
+
"size": 48
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"type": "Control",
|
|
195
|
+
"scope": "#/properties/destination",
|
|
196
|
+
"options": {
|
|
197
|
+
"layout": {
|
|
198
|
+
"span": 5
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "Category",
|
|
208
|
+
"label": "Wrapping",
|
|
209
|
+
"i18n": "featureNavigation.section6",
|
|
210
|
+
"elements": [
|
|
211
|
+
{
|
|
212
|
+
"type": "Label",
|
|
213
|
+
"text": "Wrap, with a minimum item width"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "HorizontalLayout",
|
|
217
|
+
"options": {
|
|
218
|
+
"wrap": true,
|
|
219
|
+
"minItemWidth": "14rem",
|
|
220
|
+
"justify": "space-between"
|
|
221
|
+
},
|
|
222
|
+
"elements": [
|
|
223
|
+
{
|
|
224
|
+
"type": "Control",
|
|
225
|
+
"scope": "#/properties/reference"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"type": "Control",
|
|
229
|
+
"scope": "#/properties/supplier"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "Control",
|
|
233
|
+
"scope": "#/properties/origin"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "Control",
|
|
237
|
+
"scope": "#/properties/destination"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "Category",
|
|
245
|
+
"label": "Conditional columns",
|
|
246
|
+
"i18n": "featureNavigation.section7",
|
|
247
|
+
"elements": [
|
|
248
|
+
{
|
|
249
|
+
"type": "Label",
|
|
250
|
+
"text": "4 / 8 / 4, and a toggle that removes the middle one"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "Control",
|
|
254
|
+
"scope": "#/properties/showTeam"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"type": "HorizontalLayout",
|
|
258
|
+
"elements": [
|
|
259
|
+
{
|
|
260
|
+
"type": "Control",
|
|
261
|
+
"scope": "#/properties/bookedBy",
|
|
262
|
+
"options": {
|
|
263
|
+
"layout": {
|
|
264
|
+
"span": 4
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"type": "Control",
|
|
270
|
+
"scope": "#/properties/teamName",
|
|
271
|
+
"options": {
|
|
272
|
+
"layout": {
|
|
273
|
+
"span": 8
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"rule": {
|
|
277
|
+
"effect": "SHOW",
|
|
278
|
+
"condition": {
|
|
279
|
+
"scope": "#/properties/showTeam",
|
|
280
|
+
"schema": {
|
|
281
|
+
"const": true
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"type": "Control",
|
|
288
|
+
"scope": "#/properties/approvedBy",
|
|
289
|
+
"options": {
|
|
290
|
+
"layout": {
|
|
291
|
+
"span": 4
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "Label",
|
|
299
|
+
"text": "The same three, by weight instead of span"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "HorizontalLayout",
|
|
303
|
+
"elements": [
|
|
304
|
+
{
|
|
305
|
+
"type": "Control",
|
|
306
|
+
"scope": "#/properties/bookedBy",
|
|
307
|
+
"options": {
|
|
308
|
+
"layout": {
|
|
309
|
+
"weight": 1
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"type": "Control",
|
|
315
|
+
"scope": "#/properties/teamName",
|
|
316
|
+
"options": {
|
|
317
|
+
"layout": {
|
|
318
|
+
"weight": 2
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"rule": {
|
|
322
|
+
"effect": "SHOW",
|
|
323
|
+
"condition": {
|
|
324
|
+
"scope": "#/properties/showTeam",
|
|
325
|
+
"schema": {
|
|
326
|
+
"const": true
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"type": "Control",
|
|
333
|
+
"scope": "#/properties/approvedBy",
|
|
334
|
+
"options": {
|
|
335
|
+
"layout": {
|
|
336
|
+
"weight": 1
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"type": "Category",
|
|
346
|
+
"label": "Fixed and automatic widths",
|
|
347
|
+
"i18n": "featureNavigation.section8",
|
|
348
|
+
"elements": [
|
|
349
|
+
{
|
|
350
|
+
"type": "Group",
|
|
351
|
+
"label": "One quarter, unused space",
|
|
352
|
+
"i18n": "quarterOnly",
|
|
353
|
+
"elements": [
|
|
354
|
+
{
|
|
355
|
+
"type": "HorizontalLayout",
|
|
356
|
+
"elements": [
|
|
357
|
+
{
|
|
358
|
+
"type": "Control",
|
|
359
|
+
"scope": "#/properties/reference",
|
|
360
|
+
"options": {
|
|
361
|
+
"layout": {
|
|
362
|
+
"span": 4
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"type": "Group",
|
|
372
|
+
"label": "Fixed plus Auto",
|
|
373
|
+
"i18n": "quarterAuto",
|
|
374
|
+
"elements": [
|
|
375
|
+
{
|
|
376
|
+
"type": "HorizontalLayout",
|
|
377
|
+
"elements": [
|
|
378
|
+
{
|
|
379
|
+
"type": "Control",
|
|
380
|
+
"scope": "#/properties/reference",
|
|
381
|
+
"options": {
|
|
382
|
+
"layout": {
|
|
383
|
+
"span": 4
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"type": "Control",
|
|
389
|
+
"scope": "#/properties/supplier"
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"type": "Group",
|
|
397
|
+
"label": "Fixed plus two Auto",
|
|
398
|
+
"i18n": "quarterTwoAuto",
|
|
399
|
+
"elements": [
|
|
400
|
+
{
|
|
401
|
+
"type": "HorizontalLayout",
|
|
402
|
+
"elements": [
|
|
403
|
+
{
|
|
404
|
+
"type": "Control",
|
|
405
|
+
"scope": "#/properties/reference",
|
|
406
|
+
"options": {
|
|
407
|
+
"layout": {
|
|
408
|
+
"span": 4
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"type": "Control",
|
|
414
|
+
"scope": "#/properties/supplier"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"type": "Control",
|
|
418
|
+
"scope": "#/properties/notes"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"type": "Group",
|
|
426
|
+
"label": "Fixed widths leave unused space",
|
|
427
|
+
"i18n": "unusedHalf",
|
|
428
|
+
"elements": [
|
|
429
|
+
{
|
|
430
|
+
"type": "HorizontalLayout",
|
|
431
|
+
"elements": [
|
|
432
|
+
{
|
|
433
|
+
"type": "Control",
|
|
434
|
+
"scope": "#/properties/reference",
|
|
435
|
+
"options": {
|
|
436
|
+
"layout": {
|
|
437
|
+
"span": 4
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"type": "Control",
|
|
443
|
+
"scope": "#/properties/supplier",
|
|
444
|
+
"options": {
|
|
445
|
+
"layout": {
|
|
446
|
+
"span": 4
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"type": "Group",
|
|
456
|
+
"label": "Overflow wraps in order",
|
|
457
|
+
"i18n": "overflow",
|
|
458
|
+
"elements": [
|
|
459
|
+
{
|
|
460
|
+
"type": "HorizontalLayout",
|
|
461
|
+
"elements": [
|
|
462
|
+
{
|
|
463
|
+
"type": "Control",
|
|
464
|
+
"scope": "#/properties/reference",
|
|
465
|
+
"options": {
|
|
466
|
+
"layout": {
|
|
467
|
+
"span": 12
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"type": "Control",
|
|
473
|
+
"scope": "#/properties/supplier",
|
|
474
|
+
"options": {
|
|
475
|
+
"layout": {
|
|
476
|
+
"span": 8
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"type": "Control",
|
|
482
|
+
"scope": "#/properties/notes"
|
|
483
|
+
}
|
|
484
|
+
],
|
|
485
|
+
"options": {
|
|
486
|
+
"wrap": true
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"type": "Group",
|
|
493
|
+
"label": "All Auto, equal thirds",
|
|
494
|
+
"i18n": "equalThirds",
|
|
495
|
+
"elements": [
|
|
496
|
+
{
|
|
497
|
+
"type": "HorizontalLayout",
|
|
498
|
+
"elements": [
|
|
499
|
+
{
|
|
500
|
+
"type": "Control",
|
|
501
|
+
"scope": "#/properties/reference"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"type": "Control",
|
|
505
|
+
"scope": "#/properties/supplier"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"type": "Control",
|
|
509
|
+
"scope": "#/properties/notes"
|
|
510
|
+
}
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"type": "Category",
|
|
519
|
+
"label": "Nested presentation",
|
|
520
|
+
"i18n": "nestedSizing.tab",
|
|
521
|
+
"elements": [
|
|
522
|
+
{
|
|
523
|
+
"type": "HorizontalLayout",
|
|
524
|
+
"elements": [
|
|
525
|
+
{
|
|
526
|
+
"type": "Label",
|
|
527
|
+
"text": "Quarter-width label",
|
|
528
|
+
"i18n": "nestedSizing.label",
|
|
529
|
+
"options": {
|
|
530
|
+
"layout": {
|
|
531
|
+
"span": 4
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"type": "Group",
|
|
537
|
+
"label": "Nested group",
|
|
538
|
+
"i18n": "nestedSizing.group",
|
|
539
|
+
"options": {
|
|
540
|
+
"layout": {
|
|
541
|
+
"span": 8
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"elements": [
|
|
545
|
+
{
|
|
546
|
+
"type": "Control",
|
|
547
|
+
"scope": "#/properties/notes"
|
|
548
|
+
}
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
]
|
|
558
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Example: markup labels
|
|
2
|
+
|
|
3
|
+
**Example ID:** `markup-label`\
|
|
4
|
+
**Demo entry:** **Spec: Markup labels** (`#spec-markup-label`)\
|
|
5
|
+
**Domain:** a workshop registration form\
|
|
6
|
+
**Specs covered:**
|
|
7
|
+
|
|
8
|
+
- [Markdown policy](../../docs/spec.md#10-markdown-policy)
|
|
9
|
+
- [URL policy](../../docs/spec.md#10-markdown-policy)
|
|
10
|
+
- [Text, markup and interpolation](../../docs/spec.md#10-markdown-policy)
|
|
11
|
+
- [The markup label](../../docs/spec.md#10-markdown-policy)
|
|
12
|
+
|
|
13
|
+
A `Label` whose `options.markup` is `"markdown"` renders through the
|
|
14
|
+
restricted Markdown profile instead of as a string. Everything here is a
|
|
15
|
+
`Label`; the controls at the bottom are there only so the labels sit in a real
|
|
16
|
+
form.
|
|
17
|
+
|
|
18
|
+
## Files
|
|
19
|
+
|
|
20
|
+
| File | Role |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `schema.json` | Four properties, so the page has something to fill in. |
|
|
23
|
+
| `uischema.json` | Seven labels: five Markdown (one of them with `typography: false`), one explicitly plain, one asking for a markup this renderer set does not implement. |
|
|
24
|
+
| `data.json` | A filled-in registration. |
|
|
25
|
+
| `config.json` | The Markdown gate, and a URL policy narrowed to `https` and `mailto`. |
|
|
26
|
+
| `translations.json` | English and Bulgarian. The **catalog** carries the Markdown, not just the element. |
|
|
27
|
+
|
|
28
|
+
## It is a `Label`, not a new element type
|
|
29
|
+
|
|
30
|
+
There is no `MarkdownLabel`. An element type the base renderer set does not
|
|
31
|
+
know renders as **nothing at all**, so a form authored that way and opened on
|
|
32
|
+
a base-only build would lose its text. `Label` with an option degrades
|
|
33
|
+
instead: the base renderer still claims it at rank 1 and still shows the
|
|
34
|
+
words, unparsed. §1's "unknown options are preserved and ignored" is what
|
|
35
|
+
makes that work, and it works for options, not for types.
|
|
36
|
+
|
|
37
|
+
## What the basic profile draws
|
|
38
|
+
|
|
39
|
+
The joining-instructions and "please bring" labels between them use every
|
|
40
|
+
construct §10's basic profile lists: **bold**, *italic*, ~~strikethrough~~,
|
|
41
|
+
`inline code`, links, and ordered and unordered lists.
|
|
42
|
+
|
|
43
|
+
The cancellation label starts with `# Cancellation`, which the basic profile
|
|
44
|
+
excludes. It renders as those characters — the **rule** is disabled, so the
|
|
45
|
+
`#` is never consumed. Filtering the heading out of the output instead would
|
|
46
|
+
have silently promoted the line to an ordinary paragraph, and an author would
|
|
47
|
+
be left wondering where their heading went.
|
|
48
|
+
|
|
49
|
+
Turn `markup.markdown.profile` to `"extended"` in `config.json` and that label
|
|
50
|
+
becomes a real heading. Extended adds exactly four things — headings,
|
|
51
|
+
blockquotes, tables and fenced code — and keeps every security rule.
|
|
52
|
+
|
|
53
|
+
## Links go through the URL policy
|
|
54
|
+
|
|
55
|
+
`config.json` narrows `allowedSchemes` to `https` and `mailto`. The joining
|
|
56
|
+
label's two links survive; the refunds label's `http://` link does not, and
|
|
57
|
+
renders as plain text with its words intact, the same way a refused `Link`
|
|
58
|
+
element does.
|
|
59
|
+
|
|
60
|
+
This is worth seeing because markdown-it has a scheme check of its own, which
|
|
61
|
+
this implementation **replaces** rather than layers on top of. Two checks in
|
|
62
|
+
series would make the effective policy their intersection, so a host that
|
|
63
|
+
widened `allowedSchemes` would silently get nothing for the schemes
|
|
64
|
+
markdown-it happens to dislike — and a link refused before parsing raises no
|
|
65
|
+
diagnostic at all.
|
|
66
|
+
|
|
67
|
+
## Refusals show the text as well as the reason
|
|
68
|
+
|
|
69
|
+
The last label asks for `"asciidoc"`. It gets a diagnostic **and** its text.
|
|
70
|
+
The same is true when a host sets `markdown.enabled: false`.
|
|
71
|
+
|
|
72
|
+
That differs from a refused `TemplateLayout`, which renders nothing but its
|
|
73
|
+
diagnostic, and the difference is the point: a template is a program, and
|
|
74
|
+
running it is the whole reason it is there. A label's text is inert content,
|
|
75
|
+
readable whether or not its asterisks became bold. Hiding it would turn a
|
|
76
|
+
policy decision into missing information on the page.
|
|
77
|
+
|
|
78
|
+
## The catalog carries the Markdown
|
|
79
|
+
|
|
80
|
+
`translations.json` holds Markdown in both languages, not only the English
|
|
81
|
+
fallback in the UI schema. A label's text resolves through the translator
|
|
82
|
+
first (`i18n` prefix, then `.text`), and it is the **resolved** string that is
|
|
83
|
+
parsed. Switch the demo to Bulgarian and the bold, the code span and both
|
|
84
|
+
links are still there.
|
|
85
|
+
|
|
86
|
+
## Typography
|
|
87
|
+
|
|
88
|
+
Rendered text is wrapped in the UI library's own text component by default, so
|
|
89
|
+
it picks up the theme's colour, size and link styling.
|
|
90
|
+
|
|
91
|
+
The fine-print label sets `options.typography: false` and sits directly above
|
|
92
|
+
the controls. It omits the text wrapper and its theme spacing. Compare it with
|
|
93
|
+
the joining-instructions label, which keeps the default wrapper.
|
|
94
|
+
|
|
95
|
+
The same switch exists form-wide as
|
|
96
|
+
`jsonformsExtended.markup.typography: false`, and the element option wins over
|
|
97
|
+
it. Either way it governs the **box**, not the Markdown: the fine print is
|
|
98
|
+
still parsed, still bold, and its link still goes through the URL policy.
|
|
99
|
+
|
|
100
|
+
## Standalone host setup
|
|
101
|
+
|
|
102
|
+
Load the JSON assets listed in [the catalog](../catalog.json) into a host
|
|
103
|
+
with the relevant renderer capabilities. No framework registration module is
|
|
104
|
+
required by this package.
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Feature navigation
|
|
108
|
+
|
|
109
|
+
Explore one feature at a time using the tabs: **Markdown content**, **Headings and literal text**, **Markup options**, **Form integration**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
|