@chobantonov/jsonforms-extended-spec 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conformance/authoring.json +511 -0
- package/conformance/behavior.json +2373 -4
- package/conformance/config-consumption.json +13 -2
- package/docs/audit.md +17 -2
- package/docs/conditional-fields.md +133 -6
- package/docs/external-resources-proposal.md +8 -2
- package/docs/implementation-guide.md +129 -90
- package/docs/implementation-pitfalls.md +393 -1
- package/docs/implementation-web-typescript.md +2 -5
- package/docs/renderer-and-demo.md +47 -34
- package/docs/spec.md +235 -14
- package/docs/todo.md +72 -18
- package/examples/README.md +8 -2
- package/examples/additional-errors/README.md +7 -0
- package/examples/additional-properties/README.md +15 -0
- package/examples/catalog.json +16 -1
- package/examples/color-control/README.md +4 -1
- package/examples/conditional-fields/README.md +21 -3
- package/examples/conditional-fields/translations.json +4 -2
- package/examples/conditional-fields/uischema.json +67 -7
- package/examples/conditional-template-slots/README.md +14 -0
- package/examples/conditional-template-slots/config.json +7 -0
- package/examples/conditional-template-slots/data.json +5 -0
- package/examples/conditional-template-slots/schema.json +37 -0
- package/examples/conditional-template-slots/translations.json +16 -0
- package/examples/conditional-template-slots/uischema.json +22 -0
- package/examples/index.js +4 -3
- package/examples/kitchen-sink/README.md +93 -4
- package/examples/kitchen-sink/config.json +7 -0
- package/examples/kitchen-sink/data.json +14 -2
- package/examples/kitchen-sink/invalid-data.json +13 -1
- package/examples/kitchen-sink/schema.json +100 -1
- package/examples/kitchen-sink/translations.json +80 -2
- package/examples/kitchen-sink/uischema.json +239 -4
- package/examples/label-interpolation/README.md +58 -1
- package/examples/label-interpolation/config.json +8 -2
- package/examples/label-interpolation/translations.json +8 -4
- package/examples/label-interpolation/uischema.json +31 -8
- package/package.json +1 -1
- package/schemas/README.md +8 -3
- package/schemas/jsonforms-config.schema.json +1 -1
- package/schemas/jsonforms-extended-config.schema.json +5 -0
- package/schemas/jsonforms-extended-uischema.schema.json +11 -2
- package/schemas/jsonforms-uischema.schema.json +14 -1
- package/typescript/README.md +8 -2
- package/typescript/lib/authoring/forSchema.d.ts +10 -1
- package/typescript/src/authoring/forSchema.ts +10 -1
- package/typescript/test/schemaContract.test.ts +12 -0
- package/typescript/test/typedAuthoring.test.ts +12 -1
- package/typescript/test/typedAuthoringCoverage.test.ts +33 -0
|
@@ -98,6 +98,25 @@ Companion to the [implementation guide](implementation-guide.md). These entries
|
|
|
98
98
|
|
|
99
99
|
**Behavior:** Keep the edited control mounted where practical; preserve caret, focus and selection while values and errors update. Stable identity must not freeze stale summaries or callbacks.
|
|
100
100
|
|
|
101
|
+
**Unavailable focus targets:** A web platform can keep its active element on a
|
|
102
|
+
connected control after that control becomes hidden, native-disabled, or inert.
|
|
103
|
+
Focus recovery must recognize that unavailable owned target, rather than relying
|
|
104
|
+
only on focus falling back to the document body. Read focus from the owning
|
|
105
|
+
Shadow Root where applicable. If the user has moved focus to another available
|
|
106
|
+
control, preserve that newer ownership instead of reclaiming it.
|
|
107
|
+
|
|
108
|
+
Native controls can synchronously update framework state from blur handlers.
|
|
109
|
+
Release a retiring header's focus at a safe lifecycle boundary before hiding or
|
|
110
|
+
removing it. A queued transition must not blur a newer focus owner. Keep native
|
|
111
|
+
items, displayed labels, and selection consistent during the transition.
|
|
112
|
+
|
|
113
|
+
**Additional manual acceptance:** Focus a category header, then hide that category
|
|
114
|
+
while retaining its disabled header in the DOM. Move focus to the selected
|
|
115
|
+
available category. Repeat after moving focus outside the form before hiding the
|
|
116
|
+
category; outside focus must remain untouched. For web renderers, check both
|
|
117
|
+
document and Shadow Root hosts. This is a portable acceptance case, not a claim
|
|
118
|
+
that every renderer adapter has executed it.
|
|
119
|
+
|
|
101
120
|
**Check:** Type several characters while validation changes and filtering is enabled. No dropped characters, focus jumps or stale values. Keyboard focus remains visible; pointer selection does not require an extra persistent focus ring.
|
|
102
121
|
|
|
103
122
|
## P13 — Array positions and missing values need care
|
|
@@ -132,6 +151,25 @@ Companion to the [implementation guide](implementation-guide.md). These entries
|
|
|
132
151
|
|
|
133
152
|
**Check:** Light/dark themes, narrow form pane, many tabs, keyboard-only navigation and long translated labels. Avoid unnecessary vertical scrolling in horizontal tab bars.
|
|
134
153
|
|
|
154
|
+
A dark theme may inherit a destructive token intended for a filled button
|
|
155
|
+
background. When that token also colors validation text and borders, it must
|
|
156
|
+
have readable contrast against the form surface. Check the actual error
|
|
157
|
+
message, invalid border and indicator in both direct and Web Component hosts;
|
|
158
|
+
do not infer text contrast from the button appearance.
|
|
159
|
+
|
|
160
|
+
**Native writing direction:** A widget can force LTR through its own default
|
|
161
|
+
context even inside an RTL container. Text language and writing direction are
|
|
162
|
+
independent: an English form can still be presented RTL. Forward the effective
|
|
163
|
+
container direction into native widget state, including live host changes,
|
|
164
|
+
so arrow-key navigation agrees with the displayed order rather than changing
|
|
165
|
+
CSS alone.
|
|
166
|
+
|
|
167
|
+
**Additional manual acceptance:** Render radio choices and rich cards in an
|
|
168
|
+
English RTL container. Verify the RTL arrow-key order, then switch the same
|
|
169
|
+
container to LTR and verify both the layout and native direction update. Repeat
|
|
170
|
+
in a Shadow Root. These are portable acceptance cases; executable coverage is
|
|
171
|
+
owned by each renderer adapter.
|
|
172
|
+
|
|
135
173
|
## P17 — Rich choices and summaries retain security boundaries
|
|
136
174
|
|
|
137
175
|
**Trap:** Treat custom markup/images as trusted because they occur inside a choice card, or enable broader expression/data access during filtering.
|
|
@@ -148,6 +186,24 @@ Companion to the [implementation guide](implementation-guide.md). These entries
|
|
|
148
186
|
|
|
149
187
|
**Check:** Mount, update schema/data/locale, disconnect and reconnect. Use the packaged implementation as well as source tests. Test nullable and recursive data without automatically materializing infinite children.
|
|
150
188
|
|
|
189
|
+
### Independent overlays do not inherit dismissal ownership
|
|
190
|
+
|
|
191
|
+
**Trap:** Treat every later-opened overlay as a child of an earlier overlay
|
|
192
|
+
because a native layer manager orders them that way. Closing a validation
|
|
193
|
+
popover can then dismiss an independent property editor while the user types.
|
|
194
|
+
|
|
195
|
+
**Behavior:** Preserve logical ownership when adapting native overlay stacks.
|
|
196
|
+
An informational popup closing must not cancel an independent edit dialog or
|
|
197
|
+
discard its draft. Retain explicit Cancel, accept, Escape and actual owner
|
|
198
|
+
teardown behavior, including focus restoration in document and shadow hosts.
|
|
199
|
+
|
|
200
|
+
**Proposed acceptance case:** Pin a property-name validation popup, open Rename
|
|
201
|
+
for that property, and change the draft until its validation message changes.
|
|
202
|
+
Let the informational popup close; Rename remains open with the draft intact.
|
|
203
|
+
Cancel, verify focus returns to the opener, reopen, and accept a valid name.
|
|
204
|
+
Repeat with translated messages and an isolated component host. This is a
|
|
205
|
+
proposed interaction case, not evidence that any renderer has executed it.
|
|
206
|
+
|
|
151
207
|
## Dynamic overlays preserve typed values and committed data
|
|
152
208
|
|
|
153
209
|
**Trap:** Treat a CEL integer as a JavaScript number without checking its range,
|
|
@@ -767,7 +823,10 @@ summary, clear meaning, and draft behavior should agree across renderers.
|
|
|
767
823
|
|
|
768
824
|
A color picker should expose a labeled Clear value action at the bottom of
|
|
769
825
|
its app-owned panel when a value is present and clearing is allowed. It must
|
|
770
|
-
use the same empty-value contract as the field-level clear action.
|
|
826
|
+
use the same empty-value contract as the field-level clear action. After
|
|
827
|
+
clearing, its channel and alpha inputs should show no stale value. Changing the
|
|
828
|
+
channel view alone must not commit a fallback color; the next deliberate picker
|
|
829
|
+
edit can establish a new one. Opening the
|
|
771
830
|
field's picker should reveal the color-selection controls immediately; a large
|
|
772
831
|
native color-input swatch inside an app popover creates a second dialog when
|
|
773
832
|
activated. A browser-native color dialog cannot host application buttons, so a
|
|
@@ -775,6 +834,19 @@ renderer that needs Clear value in the picker should use an app-owned spectrum
|
|
|
775
834
|
and controls in that single panel. A renderer that uses a native dialog instead
|
|
776
835
|
must expose clear separately and record that platform limitation.
|
|
777
836
|
|
|
837
|
+
A composable picker may normalize an unset or invalid value to a default color
|
|
838
|
+
when it mounts. Keep that preview inside the picker until the user edits it;
|
|
839
|
+
opening the panel must not overwrite the form value or clear an invalid imported
|
|
840
|
+
string. Bind channel-view changes separately from the configured save format,
|
|
841
|
+
and use the shared parser and serializer when a selection is committed. If a
|
|
842
|
+
separate alpha field makes the picker hide alpha in its hex field, keep the
|
|
843
|
+
alpha field visible and preserve its value through view changes.
|
|
844
|
+
|
|
845
|
+
**Check:** Open empty and invalid imported colors, then switch HEX/RGB/HSB
|
|
846
|
+
views without editing; stored data must remain unchanged. Change a channel and
|
|
847
|
+
verify the configured save format and alpha survive. Reopen the picker and
|
|
848
|
+
confirm that its initial view matches the configured format.
|
|
849
|
+
|
|
778
850
|
**Check:** Open a duration with at least two units. Compare the numeric input
|
|
779
851
|
and Remove unit button centers; compare the input right edges and label start
|
|
780
852
|
edges across rows. Activate Remove Hours and verify that the draft loses the
|
|
@@ -800,3 +872,323 @@ Activate the field's picker and verify that saturation, hue and channel editing
|
|
|
800
872
|
are usable immediately, without activating another swatch or opening a second
|
|
801
873
|
dialog. Use pointer and keyboard editing, then clear from the same panel.
|
|
802
874
|
Test the footer action and the color-selection surface through each renderer.
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
## Clearing a dynamic property keeps its editor
|
|
878
|
+
|
|
879
|
+
Dynamic rows are discovered from keys present in form data. Delegated controls
|
|
880
|
+
that map an empty input or clear action to undefined can therefore remove the
|
|
881
|
+
row through the form core update handling. Communicate dynamic-property context
|
|
882
|
+
to the delegated editor and preserve the property at its exact path. A cleared
|
|
883
|
+
string stores an empty string even when its schema has a nonempty default.
|
|
884
|
+
Apply the same rule when literal keys require isolated editors. Nested declared
|
|
885
|
+
fields keep their ordinary clear semantics. Delete remains an explicit action
|
|
886
|
+
on the containing object.
|
|
887
|
+
|
|
888
|
+
Proposed acceptance cases are described in the
|
|
889
|
+
[additional-properties walkthrough](../examples/additional-properties/README.md).
|
|
890
|
+
Host execution is required to establish renderer support.
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
## Adapter boundaries must retain operation semantics
|
|
894
|
+
|
|
895
|
+
A native component adapter can render a shared feature successfully while omitting
|
|
896
|
+
its operation policy. Reimplementing Button activation can lose script permission,
|
|
897
|
+
ActionEvent normalization and pending-promise semantics. Supplying a grid frame and
|
|
898
|
+
icons without the deletion-policy adapter can silently skip confirmation for a
|
|
899
|
+
batch. Compare real registry interactions across renderer sets, including the host
|
|
900
|
+
callback and stored data, rather than treating shared factory unit tests or example
|
|
901
|
+
mounts as evidence that the adapter wired those behaviors.
|
|
902
|
+
|
|
903
|
+
Primitive status is another adaptation boundary. A switch has no indeterminate
|
|
904
|
+
state, so expose a localized, associated description for unset and invalid values.
|
|
905
|
+
A null control distinguishes explicit null, absence and an invalid imported value;
|
|
906
|
+
it must not normalize any of them merely by mounting. Preserve these distinctions
|
|
907
|
+
in cells as well as ordinary controls.
|
|
908
|
+
|
|
909
|
+
Proposed acceptance vectors are `adapter-operation-policy` and
|
|
910
|
+
`primitive-presence-presentation` in `conformance/behavior.json`. They require host
|
|
911
|
+
execution; adding the vectors does not certify a renderer. Exercise a pending Button
|
|
912
|
+
action, a disallowed string script, cancellation and acceptance of batch deletion,
|
|
913
|
+
and external primitive data replacement through each real renderer registry.
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
## Host styling markers must not change content
|
|
917
|
+
|
|
918
|
+
**Trap:** Insert tracking characters before Markdown parsing and assume they
|
|
919
|
+
cannot affect delimiters. Compare only plain text, losing a changed emphasis
|
|
920
|
+
node or link target. Require HTML spans from a canvas renderer, or derive
|
|
921
|
+
styling names from translated strings or data paths. Treat the host's false
|
|
922
|
+
as a permission gate, or use boolean OR merging and lose a Label's explicit false.
|
|
923
|
+
Treat any bare identifier as a declared parameter, or retain an implicit text
|
|
924
|
+
`locale` variable from an earlier contract.
|
|
925
|
+
|
|
926
|
+
**Behavior:** Treat parts and named substitution hooks as optional platform
|
|
927
|
+
integrations. On HTML, normalize authored part tokens onto existing layout
|
|
928
|
+
slots; root and direct dispatch without slots do not acquire wrappers.
|
|
929
|
+
For Label substitutions, preserve the parsed structure as well as text and URL
|
|
930
|
+
policy. Internal boundary markers must never leak, corrupt user characters,
|
|
931
|
+
or reach URL validation. Fall back to unmarked Label output when equivalence
|
|
932
|
+
cannot be guaranteed. Resolve the Label's own boolean before the host default,
|
|
933
|
+
then false. Omission inherits; local false disables a host true and local true
|
|
934
|
+
overrides a host false. Ignore a non-boolean local value as omitted. Only declared
|
|
935
|
+
parameter keys are eligible for markers. Text cannot read host locale implicitly:
|
|
936
|
+
pass it through a parameter expression. A declared parameter named `locale` is
|
|
937
|
+
valid and eligible; undeclared `{locale}` reports an unknown variable and gets
|
|
938
|
+
no span. Disabled hooks skip tracking and extra parsing. Native
|
|
939
|
+
callbacks and annotated ranges are optional; a documented no-op preserves the
|
|
940
|
+
form's meaning and is not evidence of marker support.
|
|
941
|
+
|
|
942
|
+
**Check:** Run the `styling-*` vectors in `conformance/behavior.json` through a
|
|
943
|
+
real adapter. Compare on/off output after removing only generated spans, with
|
|
944
|
+
punctuation near emphasis, adjacent/repeated values, code, line breaks, literal
|
|
945
|
+
private-use characters, safe and refused URLs, and translated parameter order.
|
|
946
|
+
Check all local/host true, false and omitted combinations, then change the
|
|
947
|
+
host default and remove a local override while mounted. Check non-boolean local
|
|
948
|
+
input against host true and false. With the data-access gate closed, change the
|
|
949
|
+
host locale: explicit `language` and `locale` parameters update and can be marked;
|
|
950
|
+
undeclared `{locale}` is diagnosed with hooks both enabled and disabled. Check nested slots,
|
|
951
|
+
root and region dispatch, invalid tokens, and unchanged accessibility and interaction. Exercise a documented canvas no-op separately.
|
|
952
|
+
These are acceptance inputs; this repository does not execute renderer tests.
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
## Conditional requiredness belongs to the object, not the layout widget
|
|
956
|
+
|
|
957
|
+
**Trap:** Update required indicators only for generated object Controls, or
|
|
958
|
+
re-evaluate against document-root data when a layout is reused inside an object
|
|
959
|
+
or array item. Treating requiredness as visibility hides base fields. Flattening
|
|
960
|
+
all conditions into the validation schema changes document validity.
|
|
961
|
+
|
|
962
|
+
**Behavior:** Project the current object's presentation once at its owning
|
|
963
|
+
Control or layout entry. All descendant layout containers use that projection;
|
|
964
|
+
base fields stay visible while their conditional required indicators change.
|
|
965
|
+
Entry-local false overrides the global default for that layout subtree. Nested
|
|
966
|
+
object Controls and array items have independent boundaries. Host form instances
|
|
967
|
+
also remain independent even when their data paths are identical; an isolated
|
|
968
|
+
editor must not inherit the enclosing form's disabled projection. Data path alone
|
|
969
|
+
does not identify an object boundary: reset inherited state wherever an independent
|
|
970
|
+
host form begins. Ignore descendant layout/Category options in both directions.
|
|
971
|
+
Filter Group header, footer and cover field bindings using the same decision as
|
|
972
|
+
the body, without entering Control details. Preserve authored placement, UI rules,
|
|
973
|
+
unbound region content, empty containers, existing layout slots and inactive data;
|
|
974
|
+
validate the original document. Whole-value code/custom editors receive the
|
|
975
|
+
original schema, while object field editors may reuse the projection. Do not
|
|
976
|
+
infer the editor's role solely from scope "#".
|
|
977
|
+
|
|
978
|
+
**Check:** Run the conditional-layout vectors through each actual renderer
|
|
979
|
+
registry, across vertical/horizontal/group and categorization variants. Toggle
|
|
980
|
+
the discriminator by editing and external data replacement, with validation on
|
|
981
|
+
and off. Check base-required fields, branch-only fields, retained values, local
|
|
982
|
+
opt-out with an explicitly enabled nested layout, and the reverse conflict.
|
|
983
|
+
Exercise Group regions, an emptied plain layout with a part marker, a same-object
|
|
984
|
+
code editor beside projected fields, nested objects and distinct array items.
|
|
985
|
+
Mount an independent form inside an opted-out outer form at the same root path
|
|
986
|
+
and verify that the inner form can enable projection. Keep authoring validation tests
|
|
987
|
+
and proposed behavior vectors separate from executed renderer certification.
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
## Conditional filtering must preserve retained editing sessions
|
|
991
|
+
|
|
992
|
+
**Trap:** Key children by their index after filtering, or by scope alone. A
|
|
993
|
+
branch-only field disappearing before a surviving editor changes the first key;
|
|
994
|
+
two authored occurrences of the same binding collide under the second. Resetting
|
|
995
|
+
an entire splitter to recompute sizes also resets every editor in it. Testing
|
|
996
|
+
focus only on the discriminator before the removed field misses this problem.
|
|
997
|
+
Stable supplied keys are insufficient if a native container replaces them with
|
|
998
|
+
indices internally, or moves retained content between separate title/detail
|
|
999
|
+
slots as earlier content disappears.
|
|
1000
|
+
|
|
1001
|
+
**Behavior:** Preserve the identity of each retained authored occurrence across
|
|
1002
|
+
conditional and ordinary-rule filtering, including Group regions and splitter
|
|
1003
|
+
panes. Internal keys or occurrence metadata are implementation details, not new
|
|
1004
|
+
portable UI-schema properties. Keep a surviving editor's focus, draft and pending
|
|
1005
|
+
write. Recompute pane sizes without replacing unrelated editors. A field's own
|
|
1006
|
+
binding or renderer change is a separate replacement case. Maintain whole-value
|
|
1007
|
+
editors' original schemas before renderer selection; object field editors may
|
|
1008
|
+
reuse inherited projections.
|
|
1009
|
+
|
|
1010
|
+
**Check:** Put a conditional field before a retained text editor. Start an edit,
|
|
1011
|
+
then switch the branch before its write commits. The retained editor stays focused
|
|
1012
|
+
and its edit commits to the same field. Repeat in a Group header/footer and a
|
|
1013
|
+
splitter whose pane count changes. Include duplicate occurrences of one binding,
|
|
1014
|
+
local opt-out and live global toggles. Run conditional projection together with
|
|
1015
|
+
dynamic scope/type resolution through the real renderer registry. An unchanged
|
|
1016
|
+
Control's DOM identity is useful React evidence, but functional preservation is
|
|
1017
|
+
the portable assertion.
|
|
1018
|
+
|
|
1019
|
+
## Conditional presentation needs a bounded static path
|
|
1020
|
+
|
|
1021
|
+
**Trap:** Scan the same immutable schema on every keystroke, clone the entire UI
|
|
1022
|
+
tree whenever any data changes, or cache projection using only visible property
|
|
1023
|
+
names. Conversely, caching the projection without checking current conditions
|
|
1024
|
+
leaves required indicators and overlapping constraints stale. Reusing a
|
|
1025
|
+
cycle-truncated search result for a different root can hide reachable conditions.
|
|
1026
|
+
|
|
1027
|
+
**Behavior:** Cache completed discovery against immutable schema identity (and
|
|
1028
|
+
reference root where relevant), with cycle-safe traversal. Reuse unaffected
|
|
1029
|
+
nodes and bounded per-boundary presentation results while active contributions
|
|
1030
|
+
are unchanged. New schema/UI identities invalidate these caches. Conditions,
|
|
1031
|
+
requiredness and dependency presence still use current object data. Keep caches
|
|
1032
|
+
isolated where data and form context affect the result; do not accumulate an
|
|
1033
|
+
unbounded history of user values. A disabled boundary may retain lightweight
|
|
1034
|
+
ownership handling without evaluating predicates or rebuilding presentation.
|
|
1035
|
+
Never sacrifice validator mutation isolation to remove a data copy.
|
|
1036
|
+
|
|
1037
|
+
**Check:** Use operation counters to verify that repeated detection of an unchanged
|
|
1038
|
+
nonconditional schema avoids another traversal. Repeated ordinary edits with the
|
|
1039
|
+
same branch decisions reuse the presentation; switching between branches that
|
|
1040
|
+
have the same field names but different requiredness or constraints updates it.
|
|
1041
|
+
Exercise cyclic schemas, immutable schema replacement, separate forms and repeated
|
|
1042
|
+
array items. Measure large forms separately: reduced work counts are not a latency
|
|
1043
|
+
benchmark or a certification of all renderer platforms.
|
|
1044
|
+
|
|
1045
|
+
The `conditional-layout-editor-continuity` and `conditional-layout-static-work`
|
|
1046
|
+
behavior vectors describe these acceptance inputs. Renderer projects record their
|
|
1047
|
+
executed evidence separately.
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
## Conditional discovery must use the same schema context as projection
|
|
1051
|
+
|
|
1052
|
+
**Trap:** Follow references while projecting fields but overlook them when deciding
|
|
1053
|
+
whether projection should run. Cache discovery by the referenced schema alone,
|
|
1054
|
+
although the same fragment can resolve differently in another document. Reject
|
|
1055
|
+
object-containing type arrays because they are not the literal string "object".
|
|
1056
|
+
|
|
1057
|
+
**Behavior:** Discover supported referenced conditions and field-bearing allOf
|
|
1058
|
+
branches in the original document context. Cache completed searches by immutable
|
|
1059
|
+
schema and resolution root; cycle-truncated child searches are not complete results.
|
|
1060
|
+
An opted-in allOf can contribute properties or required names without an if.
|
|
1061
|
+
Constraint-only branches do not by themselves introduce field presentation.
|
|
1062
|
+
Accept type arrays containing object at an object-context layout entry. This does
|
|
1063
|
+
not select a union editor or authorize converting null into an object. Preserve
|
|
1064
|
+
local opt-out, original validation and unresolved-reference diagnostics.
|
|
1065
|
+
|
|
1066
|
+
**Check:** Execute conditional-layout-discovery-reference,
|
|
1067
|
+
conditional-layout-discovery-allOf, conditional-layout-discovery-nullable and
|
|
1068
|
+
conditional-discovery-reference-context from conformance/behavior.json in each
|
|
1069
|
+
adapter. Check stars after object data changes, root-context replacement, cyclic
|
|
1070
|
+
and missing references, and null/object transitions without data initialization.
|
|
1071
|
+
These vectors are proposed renderer acceptance cases; fixture validation alone
|
|
1072
|
+
is not executed renderer certification.
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
## Conditional omission must not readdress template children
|
|
1076
|
+
|
|
1077
|
+
**Trap:** Delete inactive children before assigning fallback names, diagnose a
|
|
1078
|
+
known inactive slot as unknown, or pass an absent component type to the template
|
|
1079
|
+
runtime. Fix only the names while leaving a compacted array proxy: an absent
|
|
1080
|
+
numeric name can still fall through to another child's array index. Looking up
|
|
1081
|
+
registered template content can also lose the parent projection and requiredness.
|
|
1082
|
+
|
|
1083
|
+
**Behavior:** Preserve authored slot identity, names, collision decisions and
|
|
1084
|
+
occurrence order independently of whether a field is active. Use internal
|
|
1085
|
+
presentation metadata or equivalent empty renderable slots; do not add an option
|
|
1086
|
+
to serialized authored documents. Known inactive slots do not mount delegated
|
|
1087
|
+
controls, activate fallback or emit unknown-slot diagnostics. A reserved inactive
|
|
1088
|
+
slot is not an active field binding for container data indicators, error ownership
|
|
1089
|
+
or actionable detail summaries. Schema identity alone is not an object boundary:
|
|
1090
|
+
inherit projections only within the same host form and exact data path. Keep genuine typo
|
|
1091
|
+
and unsupported-syntax diagnostics. Do not globally convert every undefined
|
|
1092
|
+
component into empty output. Carry projection ownership through registered
|
|
1093
|
+
layouts. Reusing an input node alone does not preserve focus: moving a live slot
|
|
1094
|
+
through a detached DOM stage may blur it. Preserve focus/selection for retained
|
|
1095
|
+
editors, including inside shadow-root hosts, without restoring removed fields.
|
|
1096
|
+
|
|
1097
|
+
**Check:** Execute the conditional-template-* vectors and the conditional-template-slots
|
|
1098
|
+
example through each supported template profile and actual renderer registry.
|
|
1099
|
+
Cover root and object-detail entry, unnamed and explicit numeric names, named
|
|
1100
|
+
slots, ordered iteration, duplicate placeholders, collision diagnostics, unknown
|
|
1101
|
+
names, inactive fallback, dynamic child metadata, null/object contexts and
|
|
1102
|
+
local opt-out. Switch both directions; check original validation and retained data.
|
|
1103
|
+
Fixtures and schema tests are not executed renderer certification.
|
|
1104
|
+
|
|
1105
|
+
## Native input adapters must preserve the editor contract
|
|
1106
|
+
|
|
1107
|
+
A correct parser behind a native widget is insufficient if the widget has
|
|
1108
|
+
already changed the text. Numeric adapters must retain the original digits
|
|
1109
|
+
before conversion: `9007199254740993` must not become `9007199254740992`, and
|
|
1110
|
+
`1.9` in an integer editor must not become `1`. Apply the same policy to cells,
|
|
1111
|
+
spinners, paste and autocomplete paths. Native UTF-16 `maxlength` is not a
|
|
1112
|
+
JSON Schema code-point limit; composition must remain local until completed.
|
|
1113
|
+
|
|
1114
|
+
Calendar widgets may normalize February 31 or align an incomplete masked value
|
|
1115
|
+
on blur. Preserve impossible/incomplete text as a local draft; do not let masking
|
|
1116
|
+
turn it into a different valid date. Test the actual input, blur and picker
|
|
1117
|
+
confirmation paths independently. Numeric variable-width month masks must allow
|
|
1118
|
+
all months, including unpadded 2–9. Unsupported token masks should report their
|
|
1119
|
+
capability and retain usable unmasked entry.
|
|
1120
|
+
|
|
1121
|
+
Test hidden required markers on actual native editors and delegated table cells.
|
|
1122
|
+
A visual wrapper's `required` prop is not evidence of accessible required state.
|
|
1123
|
+
Manual screen-reader and browser geometry acceptance remains separate evidence.
|
|
1124
|
+
|
|
1125
|
+
## Pending validity is observable without a data change
|
|
1126
|
+
|
|
1127
|
+
An invalid local draft, pending file read or newly published owned error can
|
|
1128
|
+
change whether committed data is consumable while that data remains unchanged.
|
|
1129
|
+
Notify the host independently of data-change callbacks. Aggregate nested editor
|
|
1130
|
+
scopes without allowing one form to inherit another form's pending operations;
|
|
1131
|
+
commands must resolve committable edits before reading current data, and retain
|
|
1132
|
+
unresolved/staged drafts for explicit Apply/Cancel. Clear, cancellation, rebinding,
|
|
1133
|
+
external replacement and disposal invalidate superseded work.
|
|
1134
|
+
|
|
1135
|
+
Avoid rescanning every mounted editor on each field render. Maintain per-editor
|
|
1136
|
+
pending state and update aggregates only when a contributor changes. Verify both
|
|
1137
|
+
correctness and notification cost; a form-wide subscription alone does not prove
|
|
1138
|
+
bounded evaluation work.
|
|
1139
|
+
|
|
1140
|
+
## Template lookup policies have different ownership boundaries
|
|
1141
|
+
|
|
1142
|
+
Do not conflate registered-template lookup with caller slot-content overrides.
|
|
1143
|
+
The first exact registered template wins; a later named caller child replaces an
|
|
1144
|
+
earlier caller child of the same name, with a diagnostic. Names are literal own
|
|
1145
|
+
keys, including `constructor`. An unfilled structural Slot can legitimately use
|
|
1146
|
+
fallback or be empty; it is not automatically an unknown-component diagnostic.
|
|
1147
|
+
|
|
1148
|
+
Expansion ancestry belongs to the form and exact data path. Independent nested
|
|
1149
|
+
forms may reuse the same template/schema; direct or indirect recursion in the
|
|
1150
|
+
same form/path must terminate with feedback. Test named-template expansion and
|
|
1151
|
+
registry dispatch separately.
|
|
1152
|
+
|
|
1153
|
+
## Literal tree selections and delayed permissions
|
|
1154
|
+
|
|
1155
|
+
A tree can correctly identify a node with a segment array while its delegated
|
|
1156
|
+
editor still joins those segments into a dotted control path. Selecting `a.b`
|
|
1157
|
+
must edit that literal member, not the distinct nested `a` → `b` value; an empty
|
|
1158
|
+
segment must never disappear and bind the containing object. When the core path
|
|
1159
|
+
grammar cannot represent a key, isolate the selected value and replace it through
|
|
1160
|
+
literal segments. Retain applicable configuration and the original local-schema
|
|
1161
|
+
reference context; do not rebundle the whole schema on every keystroke. Rename
|
|
1162
|
+
must preserve accepted names exactly, including spaces and punctuation.
|
|
1163
|
+
|
|
1164
|
+
Readonly permission must be checked when a queued write is delivered, not only
|
|
1165
|
+
when typing schedules it. Cancel superseded work and clear its pending state when
|
|
1166
|
+
the editor becomes readonly or disabled; otherwise a host can either consume a
|
|
1167
|
+
forbidden write or remain blocked by a draft that can no longer be committed.
|
|
1168
|
+
Widgets lacking a distinct native readonly mode may need disabled presentation,
|
|
1169
|
+
but the integration must document that capability rather than silently allowing
|
|
1170
|
+
mutation under separate readonly state.
|
|
1171
|
+
|
|
1172
|
+
## Authored frames and projection-owned diagnostics
|
|
1173
|
+
|
|
1174
|
+
Conditional filtering can empty a Group header, footer or cover while leaving
|
|
1175
|
+
its body intact. Selecting a different outer component from the filtered
|
|
1176
|
+
contents can remount unrelated body editors, losing focus, selection, pending
|
|
1177
|
+
work or drafts. Derive the frame from the authored regions or otherwise keep
|
|
1178
|
+
surviving editors in the same reconciliation positions. Test the final region
|
|
1179
|
+
child disappearing and returning, for collapsible and noncollapsible Groups;
|
|
1180
|
+
keeping a later region sibling mounted does not cover this transition.
|
|
1181
|
+
|
|
1182
|
+
Reusing a projection also reuses its failure information. Its owning boundary
|
|
1183
|
+
reports those failures; a descendant reusing the result must not display or emit
|
|
1184
|
+
them again. Separate projection data from diagnostic publication ownership.
|
|
1185
|
+
Do not deduplicate by message globally: two object paths or independent forms
|
|
1186
|
+
can legitimately encounter the same failure. Clear ownership/reporting state
|
|
1187
|
+
when the failure resolves or the boundary changes.
|
|
1188
|
+
|
|
1189
|
+
JSON Forms core accepts `readOnly` as a UI/config compatibility alias. Removing
|
|
1190
|
+
renderer-specific alias code does not remove that core behavior. Preserve core
|
|
1191
|
+
resolution instead of stripping options at the integration boundary; lowercase
|
|
1192
|
+
`readonly` wins when both boolean spellings are present at the same source.
|
|
1193
|
+
Keep JSON Schema `readOnly`, canonical UI/config `readonly`, and inherited
|
|
1194
|
+
compatibility support distinct in documentation and tests.
|
|
@@ -34,8 +34,5 @@ Map logical placements to native components: field error below the editor, cell
|
|
|
34
34
|
|
|
35
35
|
## Example provenance
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
translations and host actions. Its applicant/job-preference/experience/reference/
|
|
40
|
-
résumé/declaration workflow is the basis for further expansion. This is an adaptation,
|
|
41
|
-
not a direct port: Svelte app-store actions and dynamic defaults are not copied.
|
|
37
|
+
The job-application adaptation and source inspiration are recorded in the
|
|
38
|
+
[source audit](audit.md#job-application-example-provenance).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is the maintained renderer and demo acceptance guide. It complements
|
|
4
4
|
[spec.md](spec.md), especially §30, and the [renderer selection guide](renderer-selection.md).
|
|
5
|
-
The [
|
|
5
|
+
The [authoring-schema audit](audit.md#documentation-ownership) explains the archived sources.
|
|
6
6
|
Portable data and option semantics are governed by spec.md when wording differs.
|
|
7
7
|
|
|
8
8
|
For implementation traps and cross-platform acceptance checks, also read the
|
|
@@ -59,12 +59,11 @@ The terms **MUST**, **MUST NOT**, **SHOULD**, and **MAY** describe requirements:
|
|
|
59
59
|
|
|
60
60
|
### 3.2 File ownership and structure
|
|
61
61
|
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
renderer implementations.
|
|
62
|
+
- Keep renderer and reusable component responsibilities independently
|
|
63
|
+
identifiable and reviewable. A separate file per renderer/component is the
|
|
64
|
+
recommended web implementation convention, not a portable acceptance rule.
|
|
65
|
+
- Do not obscure unrelated implementations in registry or export code. Native
|
|
66
|
+
ports may use their platform's normal module and source-file conventions.
|
|
68
67
|
- Shared behavior MAY be placed in focused utility files when it is genuinely
|
|
69
68
|
shared and has tests.
|
|
70
69
|
|
|
@@ -406,8 +405,8 @@ full `oneOf` selectors, and mixed-type selectors.
|
|
|
406
405
|
- Clearability SHOULD be enabled by default and MAY be disabled with the
|
|
407
406
|
applied `clearable` option or an equivalent documented renderer option.
|
|
408
407
|
- The Clear value action MUST exist only when the control currently has data.
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
Use the editor's storage/empty-value contract: permitted empty-string or null
|
|
409
|
+
choices remain selected values. False and zero MUST still count as data.
|
|
411
410
|
- The icon SHOULD be visually revealed when the control or its wrapper has
|
|
412
411
|
focus, when its selection UI is active, or when the pointer hovers over it.
|
|
413
412
|
It SHOULD remain hidden at other times so it does not compete with the
|
|
@@ -452,8 +451,10 @@ boolean enum values, and MUST display translated labels when available.
|
|
|
452
451
|
|
|
453
452
|
Selection controls MUST represent an absent value as genuinely unselected:
|
|
454
453
|
|
|
455
|
-
- When data is
|
|
454
|
+
- When data is absent or has the renderer's established no-selection value,
|
|
456
455
|
the trigger MUST show a placeholder and MUST NOT preselect the first item.
|
|
456
|
+
A permitted empty-string or null choice MUST remain selected, distinct from
|
|
457
|
+
absence; a mixed null value likewise selects the null type.
|
|
457
458
|
- Merely rendering or opening a dropdown MUST NOT initialize form data.
|
|
458
459
|
- A schema or application default MAY appear selected only after that default
|
|
459
460
|
has actually been applied to the JSON Forms data model.
|
|
@@ -469,7 +470,8 @@ Selection controls MUST represent an absent value as genuinely unselected:
|
|
|
469
470
|
- Native `input[type=date]`, `input[type=time]`, or
|
|
470
471
|
`input[type=datetime-local]` MUST NOT be used merely as a shortcut when the
|
|
471
472
|
UI library provides a picker.
|
|
472
|
-
- Date values
|
|
473
|
+
- Date values default to `YYYY-MM-DD` strings; an explicit save format follows
|
|
474
|
+
§9.3.1 without implicit conversion on mount or locale changes.
|
|
473
475
|
- Time values MUST retain the precision required by the schema/example.
|
|
474
476
|
- Date-time values MUST use the project's established ISO representation.
|
|
475
477
|
- Picker popovers MUST be keyboard accessible and correctly themed.
|
|
@@ -533,8 +535,10 @@ syntax without changing the option names.
|
|
|
533
535
|
|
|
534
536
|
- Object properties MUST render as object fields, never as an array or generic
|
|
535
537
|
mixed-type selector.
|
|
536
|
-
-
|
|
537
|
-
|
|
538
|
+
- Preserve explicit and registered detail layouts. Generated root details may
|
|
539
|
+
use VerticalLayout; generated nested details may use Group. Keep the single
|
|
540
|
+
object boundary and title described in
|
|
541
|
+
[the object layout contract](spec.md#object-titles-and-layout-boundaries).
|
|
538
542
|
- A named nested object SHOULD have a visible group/card title.
|
|
539
543
|
- Root objects SHOULD avoid redundant outer titles and borders.
|
|
540
544
|
- Object controls MUST support dynamic properties governed by `properties`,
|
|
@@ -548,7 +552,9 @@ syntax without changing the option names.
|
|
|
548
552
|
the mixed-type renderer; the array control itself MUST NOT report that no
|
|
549
553
|
applicable renderer exists. This includes JSON Schema `examples` arrays.
|
|
550
554
|
- Array items MUST have stable paths and keys.
|
|
551
|
-
- Add MUST
|
|
555
|
+
- Add MUST initialize an item of the correct type under
|
|
556
|
+
[§18.7](spec.md#187-array-add-item-initialization). It may need user completion;
|
|
557
|
+
initialization is not a guarantee of full schema validity.
|
|
552
558
|
- Remove MUST target the intended indexes and respect `minItems` when
|
|
553
559
|
`restrict` is enabled.
|
|
554
560
|
- Add MUST respect `maxItems` when `restrict` is enabled.
|
|
@@ -570,8 +576,9 @@ Dynamic object-property support includes `patternProperties` and
|
|
|
570
576
|
renderer MUST provide:
|
|
571
577
|
|
|
572
578
|
- a `Property Name` input and compact add icon/action;
|
|
573
|
-
-
|
|
574
|
-
|
|
579
|
+
- inline, translated feedback for invalid or duplicate name drafts, following
|
|
580
|
+
the [empty-name feedback policy](spec.md#1816-object-controls-and-dynamic-properties);
|
|
581
|
+
a schema-permitted empty name is allowed when `allowEmptyPropertyNames` is enabled;
|
|
575
582
|
- one rendered value control per dynamic property;
|
|
576
583
|
- compact rename and delete icon actions aligned with the property;
|
|
577
584
|
- a UI-library dialog for rename confirmation;
|
|
@@ -593,8 +600,11 @@ text buttons when the UI library's pattern is icon-based.
|
|
|
593
600
|
custom formats, keywords, draft behavior, and AJV options remain consistent.
|
|
594
601
|
- A name already present in the object MUST be rejected, except that a Rename
|
|
595
602
|
operation may retain its current name until a different name is committed.
|
|
596
|
-
-
|
|
597
|
-
|
|
603
|
+
- Schema-permitted literal names, including dots and enabled empty names,
|
|
604
|
+
MUST use safe segment-based updates or isolated editors under the
|
|
605
|
+
[literal-key contract](spec.md#1816-object-controls-and-dynamic-properties).
|
|
606
|
+
Ordinary Controls that cannot address a name safely must report that
|
|
607
|
+
limitation rather than write to a different path.
|
|
598
608
|
- When `additionalProperties` is `false` and `patternProperties` is present,
|
|
599
609
|
Add and Rename MUST accept names matching at least one allowed pattern and
|
|
600
610
|
reject names matching none. Explicit `propertyNames` constraints still
|
|
@@ -654,14 +664,15 @@ discarding, or replacing the existing value.
|
|
|
654
664
|
|
|
655
665
|
#### 9.6.3 Mutation and synchronization
|
|
656
666
|
|
|
657
|
-
- Add MUST preserve the new key
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
667
|
+
- Add MUST preserve the new key with a JSON-representable initial value under
|
|
668
|
+
the dynamic-property initialization contract. Do not store `undefined` where
|
|
669
|
+
it would disappear on serialization; initialization may still need completion.
|
|
670
|
+
- Clearing a dynamic property's value control MUST preserve the key. A string
|
|
671
|
+
clears to `""`, including when its schema has a nonempty default. Other types
|
|
672
|
+
use their documented JSON-representable empty value, or retain a local empty
|
|
673
|
+
draft when no suitable value exists. Do not universally substitute defaults,
|
|
674
|
+
null or zero. Follow [§18.16](spec.md#1816-object-controls-and-dynamic-properties);
|
|
675
|
+
only explicit deletion or an enclosing replacement/removal removes the key.
|
|
665
676
|
- Rename MUST preserve the property's value and object-key ordering as far as
|
|
666
677
|
JavaScript object semantics allow. It MUST be atomic: validation failure
|
|
667
678
|
leaves the original key and value unchanged.
|
|
@@ -701,8 +712,9 @@ Rules:
|
|
|
701
712
|
variant or the user explicitly selects one.
|
|
702
713
|
- Switching alternatives MUST create or retain data according to JSON Forms'
|
|
703
714
|
combinator semantics; it MUST NOT leave data in an unrelated JSON type.
|
|
704
|
-
-
|
|
705
|
-
|
|
715
|
+
- Inline details and `GENERATE` take precedence over registry lookup. Otherwise
|
|
716
|
+
use the ranked registry before generation, following
|
|
717
|
+
[§18.6](spec.md#186-shared-detail-ui-schema-selection).
|
|
706
718
|
- Mixed-type fallback renderers MUST NOT claim schemas handled by a dedicated
|
|
707
719
|
combinator renderer.
|
|
708
720
|
|
|
@@ -716,7 +728,8 @@ object, or other schema for which a more specific renderer exists.
|
|
|
716
728
|
The renderer MUST derive its available choices from the resolved schema. Its
|
|
717
729
|
selection MUST follow the current data type, with JSON Schema `number`
|
|
718
730
|
accepting integer data. Selecting a different type MUST replace the value with
|
|
719
|
-
a schema-
|
|
731
|
+
a schema-derived initial value of that type; it may still require user completion.
|
|
732
|
+
A registered per-type detail UI Schema, such as
|
|
720
733
|
`object-detail` or `array-detail`, MUST be honored.
|
|
721
734
|
|
|
722
735
|
When deriving that value, a schema `default` MUST be used only when its runtime
|
|
@@ -742,8 +755,8 @@ and behave like a normal one-line form control:
|
|
|
742
755
|
value absent and the selector unselected. This requirement also applies to
|
|
743
756
|
type selectors in structured mixed-value headers and tree-node details.
|
|
744
757
|
Dynamic-property values remain subject to the explicit-delete rule in
|
|
745
|
-
Section 9.6.3: clearing MUST preserve the key and
|
|
746
|
-
|
|
758
|
+
Section 9.6.3: clearing MUST preserve the key and use the editing mode's
|
|
759
|
+
empty-value or local-draft policy.
|
|
747
760
|
- The control for the selected primitive appears beside it in the remaining
|
|
748
761
|
width and SHOULD have the same visual height as the dropdown.
|
|
749
762
|
- For a boolean value, the checkbox or switch MUST retain its native size and
|
|
@@ -1228,8 +1241,8 @@ Before a renderer-set change is considered complete:
|
|
|
1228
1241
|
|
|
1229
1242
|
1. **Inventory the UI library.** Identify its provider, theme system, icons,
|
|
1230
1243
|
form controls, pickers, layouts, overlays, tables, and accessibility APIs.
|
|
1231
|
-
2. **Create the base renderer package.** Keep
|
|
1232
|
-
|
|
1244
|
+
2. **Create the base renderer package.** Keep renderer, cell and reusable
|
|
1245
|
+
component responsibilities clear under the platform's source conventions (§3.2).
|
|
1233
1246
|
3. **Implement primitive controls.** Establish labels, descriptions, errors,
|
|
1234
1247
|
value conversion, and read-only behavior first.
|
|
1235
1248
|
4. **Implement layouts and complex renderers.** Include objects, arrays,
|
|
@@ -1254,7 +1267,7 @@ Before a renderer-set change is considered complete:
|
|
|
1254
1267
|
A new renderer set is ready when all answers are yes:
|
|
1255
1268
|
|
|
1256
1269
|
- [ ] Does it use real UI-library components rather than simplified adapters?
|
|
1257
|
-
- [ ]
|
|
1270
|
+
- [ ] Are renderer and component responsibilities independently reviewable under the platform's source conventions?
|
|
1258
1271
|
- [ ] Are base, extended, Web Component, and demo projects separated?
|
|
1259
1272
|
- [ ] Do package and demo builds work with the documented framework toolchain?
|
|
1260
1273
|
- [ ] Does the independent demo implement the complete shared shell contract?
|