@chobantonov/jsonforms-extended-spec 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +126 -2
- package/conformance/authoring.json +2680 -0
- package/conformance/behavior.json +1602 -0
- package/conformance/config-consumption.json +1542 -0
- package/conformance/expected-invalid.json +20 -0
- package/docs/audit.md +150 -0
- package/docs/conditional-fields.md +122 -0
- package/docs/draft-07-visual-support.md +43 -0
- package/docs/external-resources-proposal.md +536 -0
- package/docs/implementation-guide.md +233 -0
- package/docs/implementation-pitfalls.md +968 -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 +8470 -0
- package/docs/todo.md +166 -0
- package/examples/README.md +127 -0
- package/examples/additional-errors/README.md +176 -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 +203 -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 +154 -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 +27 -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 +32 -0
- package/examples/conditional-fields/uischema.json +131 -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 +241 -0
- package/examples/label-interpolation/config.json +14 -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 +379 -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 +82 -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 +332 -0
- package/schemas/jsonforms-extended-uischema.schema.json +1932 -0
- package/schemas/jsonforms-rule.schema.json +104 -0
- package/schemas/jsonforms-uischema.schema.json +1434 -0
- package/typescript/README.md +546 -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 +385 -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 +428 -0
- package/typescript/src/authoring/schemaTypes.ts +143 -0
- package/typescript/src/index.ts +4 -0
- package/typescript/test/schemaContract.test.ts +638 -0
- package/typescript/test/tsconfig.json +10 -0
- package/typescript/test/typedAuthoring.test.ts +151 -0
- package/typescript/test/typedAuthoringCoverage.test.ts +178 -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,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "VerticalLayout",
|
|
3
|
+
"elements": [
|
|
4
|
+
{
|
|
5
|
+
"type": "Categorization",
|
|
6
|
+
"elements": [
|
|
7
|
+
{
|
|
8
|
+
"type": "Category",
|
|
9
|
+
"label": "Delete policy",
|
|
10
|
+
"i18n": "featureNavigation.section1",
|
|
11
|
+
"elements": [
|
|
12
|
+
{
|
|
13
|
+
"type": "Label",
|
|
14
|
+
"text": "One policy, every renderer. Config sets it; an element may override it."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "Control",
|
|
18
|
+
"scope": "#/properties/notes"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "Control",
|
|
22
|
+
"scope": "#/properties/lines"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "Control",
|
|
26
|
+
"scope": "#/properties/quietLines",
|
|
27
|
+
"options": {
|
|
28
|
+
"confirmation": {
|
|
29
|
+
"delete": "never"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "Category",
|
|
37
|
+
"label": "Array presentations",
|
|
38
|
+
"i18n": "featureNavigation.section2",
|
|
39
|
+
"elements": [
|
|
40
|
+
{
|
|
41
|
+
"type": "Label",
|
|
42
|
+
"text": "The same delete, in the other array renderers"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "Control",
|
|
46
|
+
"scope": "#/properties/milestones"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "ListWithDetail",
|
|
50
|
+
"scope": "#/properties/coordinators"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "Control",
|
|
54
|
+
"scope": "#/properties/charges",
|
|
55
|
+
"options": {
|
|
56
|
+
"variant": "ag-grid"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "Category",
|
|
63
|
+
"label": "Type changes",
|
|
64
|
+
"i18n": "featureNavigation.section3",
|
|
65
|
+
"elements": [
|
|
66
|
+
{
|
|
67
|
+
"type": "Label",
|
|
68
|
+
"text": "Type changes: complex asks only for a nonempty container. Tree Delete always asks."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "Control",
|
|
72
|
+
"scope": "#/properties/payload"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "Control",
|
|
76
|
+
"scope": "#/properties/scalar"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "Category",
|
|
82
|
+
"label": "Branch changes",
|
|
83
|
+
"i18n": "featureNavigation.section4",
|
|
84
|
+
"elements": [
|
|
85
|
+
{
|
|
86
|
+
"type": "Label",
|
|
87
|
+
"text": "Branch changes"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "Control",
|
|
91
|
+
"scope": "#/properties/contact"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "Control",
|
|
95
|
+
"scope": "#/properties/compositeRows",
|
|
96
|
+
"options": {
|
|
97
|
+
"table": true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Draft-07 metaschema
|
|
2
|
+
|
|
3
|
+
Demo: **Spec: Draft-07 metaschema** (`#spec-draft-07-metaschema`).
|
|
4
|
+
|
|
5
|
+
`schema.json` is an unmodified copy fetched from https://json-schema.org/draft-07/schema on 2026-10-01. Its canonical `$id` is retained. The example data is a schema for inventory items, not an inventory item. Editing the data therefore authors a JSON Schema document.
|
|
6
|
+
|
|
7
|
+
The root Control exercises the mixed object/boolean editor. Explore `properties`, `items`, `required`, and arbitrary values such as `default` and `examples`. Recursive schema values must be expanded on demand rather than eagerly generating an infinite form. This is a coverage example, not a claim of complete Draft-07 visual support.
|
|
8
|
+
|
|
9
|
+
Metaschema validation checks the structure of the authored schema; it does not guarantee that references resolve, regular expressions compile in every implementation, or that the schema admits any valid instance. In particular, `false` is a valid schema with no valid instances.
|
|
10
|
+
|
|
11
|
+
See [the visual authoring audit](../../docs/draft-07-visual-support.md) for limitations.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Inventory item",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"reference": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1
|
|
9
|
+
},
|
|
10
|
+
"quantity": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 0
|
|
13
|
+
},
|
|
14
|
+
"tags": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"reference"
|
|
23
|
+
],
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"title": "Core schema meta-schema",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"schemaArray": {
|
|
7
|
+
"type": "array",
|
|
8
|
+
"minItems": 1,
|
|
9
|
+
"items": { "$ref": "#" }
|
|
10
|
+
},
|
|
11
|
+
"nonNegativeInteger": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"minimum": 0
|
|
14
|
+
},
|
|
15
|
+
"nonNegativeIntegerDefault0": {
|
|
16
|
+
"allOf": [
|
|
17
|
+
{ "$ref": "#/definitions/nonNegativeInteger" },
|
|
18
|
+
{ "default": 0 }
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"simpleTypes": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"array",
|
|
24
|
+
"boolean",
|
|
25
|
+
"integer",
|
|
26
|
+
"null",
|
|
27
|
+
"number",
|
|
28
|
+
"object",
|
|
29
|
+
"string"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"stringArray": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "type": "string" },
|
|
35
|
+
"uniqueItems": true,
|
|
36
|
+
"default": []
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"type": ["object", "boolean"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"$id": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "uri-reference"
|
|
44
|
+
},
|
|
45
|
+
"$schema": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "uri"
|
|
48
|
+
},
|
|
49
|
+
"$ref": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"format": "uri-reference"
|
|
52
|
+
},
|
|
53
|
+
"$comment": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"title": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"description": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"default": true,
|
|
63
|
+
"readOnly": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"default": false
|
|
66
|
+
},
|
|
67
|
+
"writeOnly": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
71
|
+
"examples": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": true
|
|
74
|
+
},
|
|
75
|
+
"multipleOf": {
|
|
76
|
+
"type": "number",
|
|
77
|
+
"exclusiveMinimum": 0
|
|
78
|
+
},
|
|
79
|
+
"maximum": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"exclusiveMaximum": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
"minimum": {
|
|
86
|
+
"type": "number"
|
|
87
|
+
},
|
|
88
|
+
"exclusiveMinimum": {
|
|
89
|
+
"type": "number"
|
|
90
|
+
},
|
|
91
|
+
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
92
|
+
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
93
|
+
"pattern": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"format": "regex"
|
|
96
|
+
},
|
|
97
|
+
"additionalItems": { "$ref": "#" },
|
|
98
|
+
"items": {
|
|
99
|
+
"anyOf": [
|
|
100
|
+
{ "$ref": "#" },
|
|
101
|
+
{ "$ref": "#/definitions/schemaArray" }
|
|
102
|
+
],
|
|
103
|
+
"default": true
|
|
104
|
+
},
|
|
105
|
+
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
106
|
+
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
107
|
+
"uniqueItems": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": false
|
|
110
|
+
},
|
|
111
|
+
"contains": { "$ref": "#" },
|
|
112
|
+
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
|
|
113
|
+
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
|
114
|
+
"required": { "$ref": "#/definitions/stringArray" },
|
|
115
|
+
"additionalProperties": { "$ref": "#" },
|
|
116
|
+
"definitions": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": { "$ref": "#" },
|
|
119
|
+
"default": {}
|
|
120
|
+
},
|
|
121
|
+
"properties": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": { "$ref": "#" },
|
|
124
|
+
"default": {}
|
|
125
|
+
},
|
|
126
|
+
"patternProperties": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": { "$ref": "#" },
|
|
129
|
+
"propertyNames": { "format": "regex" },
|
|
130
|
+
"default": {}
|
|
131
|
+
},
|
|
132
|
+
"dependencies": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{ "$ref": "#" },
|
|
137
|
+
{ "$ref": "#/definitions/stringArray" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"propertyNames": { "$ref": "#" },
|
|
142
|
+
"const": true,
|
|
143
|
+
"enum": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": true,
|
|
146
|
+
"minItems": 1,
|
|
147
|
+
"uniqueItems": true
|
|
148
|
+
},
|
|
149
|
+
"type": {
|
|
150
|
+
"anyOf": [
|
|
151
|
+
{ "$ref": "#/definitions/simpleTypes" },
|
|
152
|
+
{
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": { "$ref": "#/definitions/simpleTypes" },
|
|
155
|
+
"minItems": 1,
|
|
156
|
+
"uniqueItems": true
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"format": { "type": "string" },
|
|
161
|
+
"contentMediaType": { "type": "string" },
|
|
162
|
+
"contentEncoding": { "type": "string" },
|
|
163
|
+
"if": { "$ref": "#" },
|
|
164
|
+
"then": { "$ref": "#" },
|
|
165
|
+
"else": { "$ref": "#" },
|
|
166
|
+
"allOf": { "$ref": "#/definitions/schemaArray" },
|
|
167
|
+
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
|
168
|
+
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
|
169
|
+
"not": { "$ref": "#" }
|
|
170
|
+
},
|
|
171
|
+
"default": true
|
|
172
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"specDraft07Metaschema.ui.elements.0.text": "Edit a JSON Schema document. The form schema is the unmodified official Draft-07 metaschema; the data is the schema you are authoring.",
|
|
4
|
+
"specDraft07Metaschema.ui.elements.1.label": "Schema document"
|
|
5
|
+
},
|
|
6
|
+
"bg": {
|
|
7
|
+
"specDraft07Metaschema.ui.elements.0.text": "Редактирайте документ JSON Schema. Схемата на формуляра е непроменената официална метасхема Draft-07, а данните са схемата, която създавате.",
|
|
8
|
+
"specDraft07Metaschema.ui.elements.1.label": "Документ на схемата"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "VerticalLayout",
|
|
3
|
+
"elements": [
|
|
4
|
+
{
|
|
5
|
+
"type": "Label",
|
|
6
|
+
"text": "Edit a JSON Schema document. The form schema is the unmodified official Draft-07 metaschema; the data is the schema you are authoring."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "Control",
|
|
10
|
+
"scope": "#",
|
|
11
|
+
"label": "Schema document"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Dynamic playground: preview and configuration forms
|
|
2
|
+
|
|
3
|
+
One opt-in `$dynamic` playground covers presentation, renderer selection, structure,
|
|
4
|
+
bindings and context. The preview and configuration forms have independent data.
|
|
5
|
+
The configuration form edits `external.settings`; the **External** editor exposes
|
|
6
|
+
the entire external object, including additional host namespaces. Valid JSON edits
|
|
7
|
+
update the preview; invalid drafts leave the last valid external state intact.
|
|
8
|
+
Switching examples resets external state. Neither editor writes business Data or Config.
|
|
9
|
+
|
|
10
|
+
| Try this | Visible result |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| Preview label / readonly / presentation | Leave Preview label empty for the translated Plan label; enter custom text to override it. Also changes editability and dropdown/radio renderer. |
|
|
13
|
+
| Compact preview spacing | Changes layout spacing. |
|
|
14
|
+
| Advanced: Amount label / invalid label binding | Leave Amount label empty for the translated default; custom text overrides it. The invalid binding keeps the earlier valid label. |
|
|
15
|
+
| Use slider editor | Replaces the numeric editor, retaining committed data and discarding unfinished drafts. |
|
|
16
|
+
| Edit alternate name | Rebinds the editing session to the alternate property. |
|
|
17
|
+
| Show extra field / flat extra layout | Replaces child elements and layout type. The inserted label displays `data.name`. |
|
|
18
|
+
| Hide name setting, then Mode = hide | Applies a dynamic JSON Forms visibility rule. |
|
|
19
|
+
| Replace whole member detail | Off patches children and keeps the Group heading; on supplies a complete flat detail without that heading. |
|
|
20
|
+
| Edit a Members row | Its detail label displays that occurrence's `item.name`. |
|
|
21
|
+
| Clear Name | Its label reflects the bound `value`; validation status changes using core `errors`. |
|
|
22
|
+
| Change locale | Catalog text translates and the locale value is displayed. |
|
|
23
|
+
| Edit Config.restrict | Changes the localized restrictions status. Member details show their dispatcher path; its encoding is adapter-specific. |
|
|
24
|
+
|
|
25
|
+
[dynamic-uischema.json](dynamic-uischema.json) is the active UI schema when the
|
|
26
|
+
adapter enables `$dynamic`; [uischema.json](uischema.json) is the static fallback.
|
|
27
|
+
Visible prose uses English/Bulgarian catalogs. User-authored labels and technical
|
|
28
|
+
values use dedicated translation keys with the supplied text as fallback. These keys are intentionally absent from the bundled catalogs; a host may explicitly translate them. Resolved values are not themselves used as catalog keys. Unknown extension payloads and literal descriptor
|
|
29
|
+
edge cases belong in resolver tests, not invisible demonstration options.
|
|
30
|
+
Trusted functions are TypeScript-only; see the spec and authoring tests.
|
|
31
|
+
|
|
32
|
+
### Patch a few keys versus supply a whole object
|
|
33
|
+
|
|
34
|
+
In the configuration form, toggle **Replace whole member detail** and inspect a
|
|
35
|
+
Members row. Off: the authored `Group` and its **Member detail** heading remain;
|
|
36
|
+
the patch only updates its children. On: a complete `VerticalLayout` replaces
|
|
37
|
+
that Group, so its heading disappears. Turning it off restores the Group.
|
|
38
|
+
Both keep the member data and the surrounding array's `collapsed: false` option.
|
|
39
|
+
|
|
40
|
+
An authored nested object is a patch. This changes/adds only `elements` while
|
|
41
|
+
keeping the existing detail's `type`, `label`, `i18n`, and any other keys:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"$dynamic": {
|
|
46
|
+
"options": {
|
|
47
|
+
"detail": {
|
|
48
|
+
"elements": [{ "type": "Control", "scope": "#/properties/name" }]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
A descriptor supplies a complete value at its target. This replaces **only
|
|
56
|
+
`options.detail`**; the old detail's keys do not survive, but other `options` do:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"$dynamic": {
|
|
61
|
+
"options": {
|
|
62
|
+
"detail": {
|
|
63
|
+
"literal": {
|
|
64
|
+
"type": "VerticalLayout",
|
|
65
|
+
"elements": [{ "type": "Control", "scope": "#/properties/name" }]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`"detail": { "bind": "external.memberDetail" }` likewise uses the complete host
|
|
74
|
+
object. Object results from `expression` or trusted functions behave the same.
|
|
75
|
+
By contrast, `"options": { "bind": "external.options" }` replaces **all options**,
|
|
76
|
+
because the descriptor is at `options`, not `options.detail`.
|
|
77
|
+
|
|
78
|
+
`literal` does not evaluate embedded `{ "bind": ... }` objects: those are data.
|
|
79
|
+
Use descriptors on individual patch keys for computed values, or bind a complete
|
|
80
|
+
host object. Nested UI elements inside a literal retain their own `$dynamic`;
|
|
81
|
+
those programs run only when the children are dispatched, in their own context.
|
|
82
|
+
|
|
83
|
+
Host-text keys are independent: `dynamicAdvanced.memberNameValue` for member
|
|
84
|
+
names (shared by the two alternative layouts), `dynamicAdvanced.documentNameValue`
|
|
85
|
+
for the document name, and `dynamicAdvanced.localeValue` for the locale display.
|
|
86
|
+
A missing `config.restrict` displays **Restrictions not specified**; this status
|
|
87
|
+
is informational and does not infer permissions or change their enforcement.
|
|
88
|
+
|
|
89
|
+
## Activation and external input
|
|
90
|
+
|
|
91
|
+
The supplied config enables overlays with `jsonformsExtended.dynamic.enabled: true`.
|
|
92
|
+
Pass the host-owned object as the form's `external` prop (or web-component property).
|
|
93
|
+
Set the config switch to `false` to see the authored fallback without changing data.
|
|
94
|
+
`external` remains available as `context.external` in templates while disabled;
|
|
95
|
+
`settings` is only this example's namespace. JSON examples never grant function trust.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": {
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"label": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"readonly": {
|
|
10
|
+
"type": "boolean"
|
|
11
|
+
},
|
|
12
|
+
"presentation": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"automatic",
|
|
16
|
+
"radio"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"compact": {
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
},
|
|
22
|
+
"slider": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"flatLayout": {
|
|
26
|
+
"type": "boolean"
|
|
27
|
+
},
|
|
28
|
+
"showExtra": {
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"useAlternate": {
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"hideNameInHideMode": {
|
|
35
|
+
"type": "boolean"
|
|
36
|
+
},
|
|
37
|
+
"amountLabel": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"invalidLabel": {
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"wholeMemberDetail": {
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"label",
|
|
49
|
+
"readonly",
|
|
50
|
+
"presentation",
|
|
51
|
+
"compact"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"data": {
|
|
55
|
+
"label": "",
|
|
56
|
+
"readonly": false,
|
|
57
|
+
"presentation": "automatic",
|
|
58
|
+
"compact": false,
|
|
59
|
+
"slider": false,
|
|
60
|
+
"flatLayout": false,
|
|
61
|
+
"showExtra": false,
|
|
62
|
+
"useAlternate": false,
|
|
63
|
+
"hideNameInHideMode": false,
|
|
64
|
+
"amountLabel": "",
|
|
65
|
+
"invalidLabel": false,
|
|
66
|
+
"wholeMemberDetail": false
|
|
67
|
+
},
|
|
68
|
+
"uischema": {
|
|
69
|
+
"type": "VerticalLayout",
|
|
70
|
+
"elements": [
|
|
71
|
+
{
|
|
72
|
+
"type": "Control",
|
|
73
|
+
"scope": "#/properties/label",
|
|
74
|
+
"label": "Preview label",
|
|
75
|
+
"i18n": "dynamicPlayground.previewLabel"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "Control",
|
|
79
|
+
"scope": "#/properties/readonly",
|
|
80
|
+
"label": "Preview readonly",
|
|
81
|
+
"i18n": "dynamicPlayground.previewReadonly"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "Control",
|
|
85
|
+
"scope": "#/properties/presentation",
|
|
86
|
+
"label": "Preview presentation",
|
|
87
|
+
"i18n": "dynamicPlayground.previewPresentation"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "Control",
|
|
91
|
+
"scope": "#/properties/compact",
|
|
92
|
+
"label": "Compact preview spacing",
|
|
93
|
+
"i18n": "dynamicPlayground.compactSpacing"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "Group",
|
|
97
|
+
"label": "Advanced",
|
|
98
|
+
"i18n": "dynamicAdvanced.advanced",
|
|
99
|
+
"elements": [
|
|
100
|
+
{
|
|
101
|
+
"type": "Control",
|
|
102
|
+
"scope": "#/properties/slider",
|
|
103
|
+
"i18n": "dynamicAdvanced.useSlider",
|
|
104
|
+
"label": "Use slider editor"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "Control",
|
|
108
|
+
"scope": "#/properties/flatLayout",
|
|
109
|
+
"i18n": "dynamicAdvanced.flatLayout",
|
|
110
|
+
"label": "Use flat extra layout"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "Control",
|
|
114
|
+
"scope": "#/properties/showExtra",
|
|
115
|
+
"i18n": "dynamicAdvanced.showExtra",
|
|
116
|
+
"label": "Show extra field"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "Control",
|
|
120
|
+
"scope": "#/properties/useAlternate",
|
|
121
|
+
"i18n": "dynamicAdvanced.editAlternate",
|
|
122
|
+
"label": "Edit alternate name"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "Control",
|
|
126
|
+
"scope": "#/properties/hideNameInHideMode",
|
|
127
|
+
"i18n": "dynamicAdvanced.hideName",
|
|
128
|
+
"label": "Hide name when mode is hide"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "Control",
|
|
132
|
+
"scope": "#/properties/amountLabel",
|
|
133
|
+
"i18n": "dynamicAdvanced.amountLabel",
|
|
134
|
+
"label": "Amount label"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "Control",
|
|
138
|
+
"scope": "#/properties/invalidLabel",
|
|
139
|
+
"i18n": "dynamicAdvanced.invalidLabel",
|
|
140
|
+
"label": "Try invalid label binding"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "Control",
|
|
144
|
+
"scope": "#/properties/wholeMemberDetail",
|
|
145
|
+
"label": "Replace whole member detail",
|
|
146
|
+
"i18n": "dynamicAdvanced.wholeMemberDetail"
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
}
|