@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,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "Categorization",
|
|
3
|
+
"elements": [
|
|
4
|
+
{
|
|
5
|
+
"type": "Category",
|
|
6
|
+
"label": "Existing tree",
|
|
7
|
+
"i18n": "tree.populated",
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"type": "Label",
|
|
11
|
+
"text": "Explore Documents, Archive and their files. Editing must preserve sibling nodes.",
|
|
12
|
+
"i18n": "tree.populatedIntro"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "Control",
|
|
16
|
+
"scope": "#/properties/populated",
|
|
17
|
+
"label": "Kind",
|
|
18
|
+
"i18n": "tree.kind"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "Category",
|
|
24
|
+
"label": "Create children",
|
|
25
|
+
"i18n": "tree.empty",
|
|
26
|
+
"elements": [
|
|
27
|
+
{
|
|
28
|
+
"type": "Label",
|
|
29
|
+
"text": "Add a child, then choose File or Folder. A new empty folder must not create descendants automatically.",
|
|
30
|
+
"i18n": "tree.emptyIntro"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "Control",
|
|
34
|
+
"scope": "#/properties/empty",
|
|
35
|
+
"label": "Kind",
|
|
36
|
+
"i18n": "tree.kind"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "Category",
|
|
42
|
+
"label": "Nested errors",
|
|
43
|
+
"i18n": "tree.invalid",
|
|
44
|
+
"elements": [
|
|
45
|
+
{
|
|
46
|
+
"type": "Label",
|
|
47
|
+
"text": "The file has an empty required name. Open its editor and repair the error.",
|
|
48
|
+
"i18n": "tree.invalidIntro"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "Control",
|
|
52
|
+
"scope": "#/properties/invalid",
|
|
53
|
+
"label": "Kind",
|
|
54
|
+
"i18n": "tree.kind"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "Category",
|
|
60
|
+
"label": "Tree editor",
|
|
61
|
+
"i18n": "tree.editor",
|
|
62
|
+
"elements": [
|
|
63
|
+
{
|
|
64
|
+
"type": "Control",
|
|
65
|
+
"scope": "#/properties/populated",
|
|
66
|
+
"label": "Kind",
|
|
67
|
+
"i18n": "tree.kind",
|
|
68
|
+
"options": {
|
|
69
|
+
"recursiveTree": {
|
|
70
|
+
"childrenProperty": "children",
|
|
71
|
+
"labelProperty": "name",
|
|
72
|
+
"detail": {
|
|
73
|
+
"type": "Control",
|
|
74
|
+
"scope": "#",
|
|
75
|
+
"label": "Kind",
|
|
76
|
+
"i18n": "tree.kind"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"match": {
|
|
4
|
+
"rank": 10,
|
|
5
|
+
"schemaPointer": "/properties/kind/const",
|
|
6
|
+
"equals": "file"
|
|
7
|
+
},
|
|
8
|
+
"uischema": {
|
|
9
|
+
"type": "VerticalLayout",
|
|
10
|
+
"elements": [
|
|
11
|
+
{
|
|
12
|
+
"type": "Control",
|
|
13
|
+
"scope": "#/properties/name"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "Control",
|
|
17
|
+
"scope": "#/properties/content"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"match": {
|
|
24
|
+
"rank": 10,
|
|
25
|
+
"schemaPointer": "/properties/kind/const",
|
|
26
|
+
"equals": "folder"
|
|
27
|
+
},
|
|
28
|
+
"uischema": {
|
|
29
|
+
"type": "VerticalLayout",
|
|
30
|
+
"elements": [
|
|
31
|
+
{
|
|
32
|
+
"type": "Control",
|
|
33
|
+
"scope": "#/properties/name"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "Control",
|
|
37
|
+
"scope": "#/properties/children",
|
|
38
|
+
"options": {
|
|
39
|
+
"collapsible": true,
|
|
40
|
+
"detail": {
|
|
41
|
+
"type": "Control",
|
|
42
|
+
"scope": "#",
|
|
43
|
+
"label": "Kind",
|
|
44
|
+
"i18n": "tree.kind"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Example: split layout
|
|
2
|
+
|
|
3
|
+
**Example ID:** `split-layout`\
|
|
4
|
+
**Demo entry:** **Spec: Split layout** (`#spec-split-layout`)\
|
|
5
|
+
**Domain:** project board\
|
|
6
|
+
**Specs covered:**
|
|
7
|
+
|
|
8
|
+
- [Wrap, defaults, splitter and Spacer](../../docs/spec.md#73-splitter)
|
|
9
|
+
- [Layout types and semantics](../../docs/spec.md#73-splitter)
|
|
10
|
+
- [Splitter](../../docs/spec.md#73-splitter)
|
|
11
|
+
|
|
12
|
+
`options.variant: "splitter"` turns either layout into draggable panes. It is a
|
|
13
|
+
project extension, reusing the shared `variant` convention rather than adding a
|
|
14
|
+
layout type — so **the layout type is the direction**.
|
|
15
|
+
|
|
16
|
+
## Files
|
|
17
|
+
|
|
18
|
+
| File | Role |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `schema.json` | Eleven plain properties, two of them toggles that hide a pane. |
|
|
21
|
+
| `uischema.json` | Five splitters: horizontal, vertical, non-resizable, one with a conditional pane, and one of three weighted panes whose middle is conditional. |
|
|
22
|
+
| `data.json` | Every pane has something to show. |
|
|
23
|
+
| `config.json` | `showUnfocusedDescription`. |
|
|
24
|
+
| `translations.json` | English and Bulgarian. |
|
|
25
|
+
|
|
26
|
+
## What the form contains
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
Project board
|
|
30
|
+
HorizontalLayout + splitter -> panes side by side, weights 2 : auto
|
|
31
|
+
VerticalLayout + splitter -> panes stacked, definite height
|
|
32
|
+
HorizontalLayout + resizable:false -> boundary stays, dragging does not
|
|
33
|
+
HorizontalLayout + splitter -> second pane behind a SHOW rule
|
|
34
|
+
HorizontalLayout + splitter -> three panes 1:2:1, middle behind a rule
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Expected behaviour
|
|
38
|
+
|
|
39
|
+
### The layout type is the direction
|
|
40
|
+
|
|
41
|
+
The first splitter is a `HorizontalLayout`, so its panes sit side by side and
|
|
42
|
+
the separator is vertical. The second is a `VerticalLayout` and stacks them.
|
|
43
|
+
There is no direction option — "layout type determines direction".
|
|
44
|
+
|
|
45
|
+
### Initial sizes come from ordinary sizing
|
|
46
|
+
|
|
47
|
+
The first splitter's panes ask for `weight: 2` and nothing, so they start at
|
|
48
|
+
two thirds and one third. "Initial sizes use normal sizing" — equal shares are
|
|
49
|
+
what Auto produces, not a rule of their own.
|
|
50
|
+
|
|
51
|
+
**`span` is not used here.** The specification says it "SHOULD NOT be used"
|
|
52
|
+
with a splitter, and a pane asking for one falls back to Auto: a draggable pane
|
|
53
|
+
has no fixed grid to be a share of.
|
|
54
|
+
|
|
55
|
+
### Dragging is runtime state
|
|
56
|
+
|
|
57
|
+
Drag a separator, then change something elsewhere in the form. The pane sizes
|
|
58
|
+
stay where you put them, and the UI schema is unchanged — "dragged sizes are
|
|
59
|
+
runtime state, not UI schema".
|
|
60
|
+
|
|
61
|
+
### A vertical splitter needs a definite height
|
|
62
|
+
|
|
63
|
+
The second splitter sets `height: "16rem"`. Without a definite height there is
|
|
64
|
+
nothing for the panes to divide; the renderer falls back to `20rem` rather
|
|
65
|
+
than collapsing.
|
|
66
|
+
|
|
67
|
+
### `resizable: false` keeps the boundary
|
|
68
|
+
|
|
69
|
+
The third splitter is not resizable. The separator is still drawn — it is a
|
|
70
|
+
real boundary between panes — but it is no longer focusable or draggable.
|
|
71
|
+
`resizable` defaults to true.
|
|
72
|
+
|
|
73
|
+
### A hidden pane leaves layout
|
|
74
|
+
|
|
75
|
+
Tick **Show audit pane**. The fourth splitter gains a pane *and* a separator;
|
|
76
|
+
before that it has neither. A hidden child does not hold a share open.
|
|
77
|
+
|
|
78
|
+
### Three panes, and one of them goes
|
|
79
|
+
|
|
80
|
+
The last splitter holds **Booked by / Team / Approved by** at `weight`
|
|
81
|
+
1 : 2 : 1, so they start at 25 / 50 / 25. **Show team pane** removes the middle
|
|
82
|
+
one, and the two that remain divide the space again at 50 / 50.
|
|
83
|
+
|
|
84
|
+
Panes are weighted rather than spanned on purpose: "span SHOULD NOT be used"
|
|
85
|
+
with a splitter, and a pane asking for one falls back to Auto. The contrast is
|
|
86
|
+
worth seeing against the
|
|
87
|
+
[layout-sizing](../layout-sizing/README.md) example, where the *same* three
|
|
88
|
+
children sized by `span` leave a hole when the middle disappears — span is a
|
|
89
|
+
share of a fixed grid, weight is a share of what is present.
|
|
90
|
+
|
|
91
|
+
## Fallback behaviour
|
|
92
|
+
|
|
93
|
+
| Situation | Result |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| No `resizable` | True: panes drag. |
|
|
96
|
+
| `resizable: false` | The separator remains as a boundary, inert. |
|
|
97
|
+
| No `height` on a vertical splitter | `20rem`. |
|
|
98
|
+
| A pane with `options.layout.weight` | Its share of the initial sizes. |
|
|
99
|
+
| A pane with `options.layout.span` | Ignored; treated as Auto. |
|
|
100
|
+
| `wrap` together with the variant | Unsupported, and diagnosed. |
|
|
101
|
+
| A hidden pane | Leaves layout, separator included. |
|
|
102
|
+
|
|
103
|
+
## Accessibility
|
|
104
|
+
|
|
105
|
+
A resizable boundary should expose separator semantics, its orientation and
|
|
106
|
+
current position, and support keyboard resizing. The registered adapter chooses
|
|
107
|
+
the component; the authored layout and its sizing contract stay the same.
|
|
108
|
+
|
|
109
|
+
## Conformance scope
|
|
110
|
+
|
|
111
|
+
This walkthrough describes the portable contract. Renderer support must be checked
|
|
112
|
+
by a host adapter; the package validates the authored assets, not live UI behavior.
|
|
113
|
+
|
|
114
|
+
## Standalone host setup
|
|
115
|
+
|
|
116
|
+
Load the JSON assets listed in [the catalog](../catalog.json) into a host
|
|
117
|
+
with the relevant renderer capabilities. No framework registration module is
|
|
118
|
+
required by this package.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Feature navigation
|
|
122
|
+
|
|
123
|
+
Explore one feature at a time using the tabs: **Horizontal splitter**, **Vertical splitter**, **Fixed boundary**, **Hidden pane**, **Three panes**. Tab titles are localized in English and Bulgarian. The tabs share the existing form data.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"queue": "12 tasks waiting",
|
|
3
|
+
"notes": "Office closes at 18:00.",
|
|
4
|
+
"detail": "Review phase, 12 open tasks",
|
|
5
|
+
"mapNote": "Review the pending tasks.",
|
|
6
|
+
"summary": "Two suppliers unassigned.",
|
|
7
|
+
"showAudit": false,
|
|
8
|
+
"audit": "Reassigned by A. Ferreira.",
|
|
9
|
+
"showTeamPane": true,
|
|
10
|
+
"bookedBy": "A. Ferreira",
|
|
11
|
+
"teamName": "PLAN-REVIEW nightly",
|
|
12
|
+
"approvedBy": "M. Todorova"
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"title": "Project board",
|
|
4
|
+
"properties": {
|
|
5
|
+
"queue": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"title": "Queue"
|
|
8
|
+
},
|
|
9
|
+
"notes": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"title": "Notes"
|
|
12
|
+
},
|
|
13
|
+
"detail": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"title": "Leg detail"
|
|
16
|
+
},
|
|
17
|
+
"mapNote": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"title": "Map note"
|
|
20
|
+
},
|
|
21
|
+
"summary": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"title": "Summary"
|
|
24
|
+
},
|
|
25
|
+
"showAudit": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"title": "Show audit pane"
|
|
28
|
+
},
|
|
29
|
+
"audit": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"title": "Audit"
|
|
32
|
+
},
|
|
33
|
+
"showTeamPane": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"title": "Show team pane"
|
|
36
|
+
},
|
|
37
|
+
"bookedBy": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"title": "Booked by"
|
|
40
|
+
},
|
|
41
|
+
"teamName": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"title": "Team"
|
|
44
|
+
},
|
|
45
|
+
"approvedBy": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"title": "Approved by"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"control.clearValue": "Clear value",
|
|
4
|
+
"featureNavigation.section1.label": "Horizontal splitter",
|
|
5
|
+
"featureNavigation.section2.label": "Vertical splitter",
|
|
6
|
+
"featureNavigation.section3.label": "Fixed boundary",
|
|
7
|
+
"featureNavigation.section4.label": "Hidden pane",
|
|
8
|
+
"featureNavigation.section5.label": "Three panes",
|
|
9
|
+
"queue.label": "Queue",
|
|
10
|
+
"notes.label": "Notes",
|
|
11
|
+
"detail.label": "Leg detail",
|
|
12
|
+
"mapNote.label": "Map note",
|
|
13
|
+
"summary.label": "Summary",
|
|
14
|
+
"showAudit.label": "Show audit pane",
|
|
15
|
+
"audit.label": "Audit",
|
|
16
|
+
"showTeamPane.label": "Show team pane",
|
|
17
|
+
"bookedBy.label": "Booked by",
|
|
18
|
+
"teamName.label": "Team",
|
|
19
|
+
"approvedBy.label": "Approved by",
|
|
20
|
+
"Horizontal splitter: the layout type is the direction": "Horizontal splitter: the layout type is the direction",
|
|
21
|
+
"Vertical splitter: needs a definite height": "Vertical splitter: needs a definite height",
|
|
22
|
+
"resizable: false keeps the boundary, drops the dragging": "resizable: false keeps the boundary, drops the dragging",
|
|
23
|
+
"A hidden pane leaves layout, separator and all": "A hidden pane leaves layout, separator and all",
|
|
24
|
+
"Three panes at 1 : 2 : 1, and a toggle that removes the middle": "Three panes at 1 : 2 : 1, and a toggle that removes the middle"
|
|
25
|
+
},
|
|
26
|
+
"bg": {
|
|
27
|
+
"control.clearValue": "Изчистване на стойността",
|
|
28
|
+
"featureNavigation.section1.label": "Хоризонтален разделител",
|
|
29
|
+
"featureNavigation.section2.label": "Вертикален разделител",
|
|
30
|
+
"featureNavigation.section3.label": "Фиксирана граница",
|
|
31
|
+
"featureNavigation.section4.label": "Скрит панел",
|
|
32
|
+
"featureNavigation.section5.label": "Три панела",
|
|
33
|
+
"queue.label": "Опашка",
|
|
34
|
+
"notes.label": "Бележки",
|
|
35
|
+
"detail.label": "Подробности за етапа",
|
|
36
|
+
"mapNote.label": "Бележка за картата",
|
|
37
|
+
"summary.label": "Обобщение",
|
|
38
|
+
"showAudit.label": "Показване на панела за одит",
|
|
39
|
+
"audit.label": "Одит",
|
|
40
|
+
"showTeamPane.label": "Показване на панела на екипа",
|
|
41
|
+
"bookedBy.label": "Резервирано от",
|
|
42
|
+
"teamName.label": "Екип",
|
|
43
|
+
"approvedBy.label": "Одобрено от",
|
|
44
|
+
"Horizontal splitter: the layout type is the direction": "Хоризонтален разделител: типът на оформлението определя посоката",
|
|
45
|
+
"Vertical splitter: needs a definite height": "Вертикален разделител: необходима е определена височина",
|
|
46
|
+
"resizable: false keeps the boundary, drops the dragging": "resizable: false запазва границата и изключва преоразмеряването",
|
|
47
|
+
"A hidden pane leaves layout, separator and all": "Скритият панел се премахва от оформлението заедно с разделителя",
|
|
48
|
+
"Three panes at 1 : 2 : 1, and a toggle that removes the middle": "Три панела в съотношение 1 : 2 : 1 и превключвател за скриване на средния"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
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": "Horizontal splitter",
|
|
13
|
+
"i18n": "featureNavigation.section1",
|
|
14
|
+
"elements": [
|
|
15
|
+
{
|
|
16
|
+
"type": "Label",
|
|
17
|
+
"text": "Horizontal splitter: the layout type is the direction"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "HorizontalLayout",
|
|
21
|
+
"options": {
|
|
22
|
+
"variant": "splitter",
|
|
23
|
+
"height": "14rem"
|
|
24
|
+
},
|
|
25
|
+
"elements": [
|
|
26
|
+
{
|
|
27
|
+
"type": "Control",
|
|
28
|
+
"scope": "#/properties/queue",
|
|
29
|
+
"options": {
|
|
30
|
+
"layout": {
|
|
31
|
+
"weight": 2
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "Control",
|
|
37
|
+
"scope": "#/properties/detail"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "Category",
|
|
45
|
+
"label": "Vertical splitter",
|
|
46
|
+
"i18n": "featureNavigation.section2",
|
|
47
|
+
"elements": [
|
|
48
|
+
{
|
|
49
|
+
"type": "Label",
|
|
50
|
+
"text": "Vertical splitter: needs a definite height"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "VerticalLayout",
|
|
54
|
+
"options": {
|
|
55
|
+
"variant": "splitter",
|
|
56
|
+
"height": "16rem"
|
|
57
|
+
},
|
|
58
|
+
"elements": [
|
|
59
|
+
{
|
|
60
|
+
"type": "Control",
|
|
61
|
+
"scope": "#/properties/mapNote"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "Control",
|
|
65
|
+
"scope": "#/properties/summary"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "Category",
|
|
73
|
+
"label": "Fixed boundary",
|
|
74
|
+
"i18n": "featureNavigation.section3",
|
|
75
|
+
"elements": [
|
|
76
|
+
{
|
|
77
|
+
"type": "Label",
|
|
78
|
+
"text": "resizable: false keeps the boundary, drops the dragging"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "HorizontalLayout",
|
|
82
|
+
"options": {
|
|
83
|
+
"variant": "splitter",
|
|
84
|
+
"resizable": false,
|
|
85
|
+
"height": "10rem"
|
|
86
|
+
},
|
|
87
|
+
"elements": [
|
|
88
|
+
{
|
|
89
|
+
"type": "Control",
|
|
90
|
+
"scope": "#/properties/queue"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "Control",
|
|
94
|
+
"scope": "#/properties/notes"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "Category",
|
|
102
|
+
"label": "Hidden pane",
|
|
103
|
+
"i18n": "featureNavigation.section4",
|
|
104
|
+
"elements": [
|
|
105
|
+
{
|
|
106
|
+
"type": "Label",
|
|
107
|
+
"text": "A hidden pane leaves layout, separator and all"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "Control",
|
|
111
|
+
"scope": "#/properties/showAudit"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "HorizontalLayout",
|
|
115
|
+
"options": {
|
|
116
|
+
"variant": "splitter",
|
|
117
|
+
"height": "10rem"
|
|
118
|
+
},
|
|
119
|
+
"elements": [
|
|
120
|
+
{
|
|
121
|
+
"type": "Control",
|
|
122
|
+
"scope": "#/properties/summary"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "Control",
|
|
126
|
+
"scope": "#/properties/audit",
|
|
127
|
+
"rule": {
|
|
128
|
+
"effect": "SHOW",
|
|
129
|
+
"condition": {
|
|
130
|
+
"scope": "#/properties/showAudit",
|
|
131
|
+
"schema": {
|
|
132
|
+
"const": true
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "Category",
|
|
143
|
+
"label": "Three panes",
|
|
144
|
+
"i18n": "featureNavigation.section5",
|
|
145
|
+
"elements": [
|
|
146
|
+
{
|
|
147
|
+
"type": "Label",
|
|
148
|
+
"text": "Three panes at 1 : 2 : 1, and a toggle that removes the middle"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "Control",
|
|
152
|
+
"scope": "#/properties/showTeamPane"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "HorizontalLayout",
|
|
156
|
+
"options": {
|
|
157
|
+
"variant": "splitter",
|
|
158
|
+
"height": "10rem"
|
|
159
|
+
},
|
|
160
|
+
"elements": [
|
|
161
|
+
{
|
|
162
|
+
"type": "Control",
|
|
163
|
+
"scope": "#/properties/bookedBy",
|
|
164
|
+
"options": {
|
|
165
|
+
"layout": {
|
|
166
|
+
"weight": 1
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "Control",
|
|
172
|
+
"scope": "#/properties/teamName",
|
|
173
|
+
"options": {
|
|
174
|
+
"layout": {
|
|
175
|
+
"weight": 2
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"rule": {
|
|
179
|
+
"effect": "SHOW",
|
|
180
|
+
"condition": {
|
|
181
|
+
"scope": "#/properties/showTeamPane",
|
|
182
|
+
"schema": {
|
|
183
|
+
"const": true
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "Control",
|
|
190
|
+
"scope": "#/properties/approvedBy",
|
|
191
|
+
"options": {
|
|
192
|
+
"layout": {
|
|
193
|
+
"weight": 1
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|