@chobantonov/jsonforms-extended-spec 0.3.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.
Files changed (32) hide show
  1. package/conformance/behavior.json +1503 -5
  2. package/docs/audit.md +17 -2
  3. package/docs/conditional-fields.md +101 -16
  4. package/docs/external-resources-proposal.md +8 -2
  5. package/docs/implementation-guide.md +75 -89
  6. package/docs/implementation-pitfalls.md +232 -6
  7. package/docs/implementation-web-typescript.md +2 -5
  8. package/docs/renderer-and-demo.md +47 -34
  9. package/docs/spec.md +85 -13
  10. package/docs/todo.md +58 -21
  11. package/examples/catalog.json +16 -1
  12. package/examples/conditional-fields/README.md +10 -0
  13. package/examples/conditional-template-slots/README.md +14 -0
  14. package/examples/conditional-template-slots/config.json +7 -0
  15. package/examples/conditional-template-slots/data.json +5 -0
  16. package/examples/conditional-template-slots/schema.json +37 -0
  17. package/examples/conditional-template-slots/translations.json +16 -0
  18. package/examples/conditional-template-slots/uischema.json +22 -0
  19. package/examples/index.js +3 -2
  20. package/examples/kitchen-sink/README.md +93 -4
  21. package/examples/kitchen-sink/config.json +7 -0
  22. package/examples/kitchen-sink/data.json +14 -2
  23. package/examples/kitchen-sink/invalid-data.json +13 -1
  24. package/examples/kitchen-sink/schema.json +100 -1
  25. package/examples/kitchen-sink/translations.json +80 -2
  26. package/examples/kitchen-sink/uischema.json +239 -4
  27. package/examples/label-interpolation/README.md +17 -1
  28. package/examples/label-interpolation/translations.json +8 -4
  29. package/examples/label-interpolation/uischema.json +25 -6
  30. package/package.json +1 -1
  31. package/schemas/jsonforms-extended-uischema.schema.json +3 -3
  32. package/schemas/jsonforms-uischema.schema.json +3 -3
package/docs/spec.md CHANGED
@@ -30,7 +30,9 @@ fallback that preserves data.
30
30
  Sections 1–28 define the model and renderer behavior. Section 29 defines the
31
31
  schema artifacts and validation boundary. Section 30 covers host integration,
32
32
  demo behavior and accessibility. Appendix A records proposals that are **not
33
- part of v1 conformance**. The examples are portable assets, with explicit host
33
+ part of v1 conformance**. Appendix B contains accepted supplemental contracts;
34
+ its placement does not make them proposals or certify adapter support. The
35
+ examples are portable assets, with explicit host
34
36
  requirements in [the catalog](../examples/catalog.json).
35
37
 
36
38
  ## Contents
@@ -67,6 +69,7 @@ requirements in [the catalog](../examples/catalog.json).
67
69
  - [29. JSON schema artifacts and validation boundary](#29-json-schema-artifacts-and-validation-boundary)
68
70
  - [30. Host, demo and accessibility contracts](#30-host-demo-and-accessibility-contracts)
69
71
  - [Appendix A. Proposals outside v1 conformance](#appendix-a-proposals-outside-v1-conformance)
72
+ - [Appendix B. Accepted supplemental contracts](#appendix-b-accepted-supplemental-contracts)
70
73
 
71
74
  ## 1. Purpose and portability
72
75
 
@@ -1264,7 +1267,22 @@ or silently enable overlay expressions through the interpolation gate.
1264
1267
  | | may reference |
1265
1268
  | --- | --- |
1266
1269
  | a `textParams` **value** | `data`, `item`, `config`, `context`, subject to the interpolation gate; `locale` |
1267
- | the **text** | the declared `textParams`, and `locale` |
1270
+ | the **text** | only the declared `textParams` |
1271
+
1272
+ The text scope MUST NOT inject `locale` or any other ambient variable. To
1273
+ show the host locale, declare it explicitly, for example
1274
+ `"textParams": { "language": "{locale}" }`, then use `{language}` in the text.
1275
+ `locale` remains available to parameter expressions even when the interpolation
1276
+ data-access gate is closed; this does not enable data namespaces. A parameter
1277
+ may itself be named `locale`: `"textParams": { "locale": "{locale}" }` reads
1278
+ the host locale on the right and exposes a declared parameter on the left.
1279
+ Parameter evaluation does not read the text scope, so there is no self-reference.
1280
+ Undeclared `{locale}` in text follows the unknown-variable diagnostic rule (§9.5).
1281
+ Locale-aware formatting functions still use the active host locale (§9.3).
1282
+
1283
+ This replaces the earlier implicit text variable. Migrate existing messages by
1284
+ adding an explicit parameter; renderers MUST NOT retain an undeclared-locale
1285
+ exception in the canonical text scope.
1268
1286
 
1269
1287
  A translated string MUST NOT be able to name a data path. `{data.customerName}`
1270
1288
  written in the text resolves to nothing and is reported, however open the gate
@@ -1389,7 +1407,9 @@ value from the Label's own option, then
1389
1407
  when the host default is absent or `false`. The host setting is a default,
1390
1408
  not a permission gate. Omit the local option to inherit that default; a schema
1391
1409
  validator MUST NOT insert a local `false` for an omitted option. This option
1392
- does not cascade from a parent layout to its descendants.
1410
+ does not cascade from a parent layout to its descendants. As defensive handling
1411
+ of unchecked input, a renderer MUST ignore a non-boolean local
1412
+ `options.textParamSpans` and resolve the effective value as if it were omitted.
1393
1413
 
1394
1414
  When the effective value is true, an HTML renderer implementing the capability
1395
1415
  wraps each nonempty substitution of a bare declared parameter name in a
@@ -1422,9 +1442,12 @@ The attribute uses the declared parameter name, never its expression, data
1422
1442
  path or resolved value. Set attributes through a safe attribute API or escape
1423
1443
  them correctly when serializing HTML. Repeated occurrences receive the same
1424
1444
  name; translated messages may reorder them without changing their names.
1425
- Expressions such as `{seats + 1}`, reserved variables such as `{locale}`, and
1426
- escaped literal braces receive no marker. Missing or empty substitutions
1427
- produce no span; rendered `0` and `false` are nonempty values. Existing failure
1445
+ Expressions such as `{seats + 1}`, undeclared identifiers and escaped literal
1446
+ braces receive no marker. Eligibility is determined from declared `textParams`
1447
+ keys, not from whether an expression is a bare identifier. A declared parameter
1448
+ named `locale` is eligible just like any other parameter; an undeclared
1449
+ `{locale}` is an authoring error (§9.1), not an implicit substitution. Missing
1450
+ or empty substitutions produce no span; rendered `0` and `false` are nonempty values. Existing failure
1428
1451
  handling and diagnostics (§9.5) remain unchanged.
1429
1452
 
1430
1453
  Markers MUST preserve text content, accessible reading order, link targets,
@@ -2486,7 +2509,16 @@ stale slot editors.
2486
2509
 
2487
2510
  **Children are addressed by name.** Each named child is available to the
2488
2511
  template as a placeholder that mounts its delegated renderer. Unnamed children
2489
- receive their decimal index as a fallback name; explicit names are recommended.
2512
+ receive their authored decimal index as a fallback name; explicit names are recommended.
2513
+ Conditional projection MUST preserve the authored address set and collision
2514
+ resolution. Known inactive slots render nothing, without unknown-slot diagnostics
2515
+ or fallback activation. Ordered child views MUST NOT alias a later child into an
2516
+ inactive numeric address, even when the numeric name was explicit. Iteration
2517
+ renders only active content while retaining slot identity. A profile that supports
2518
+ component-style child references applies the same rule to those references;
2519
+ unknown names and unsupported syntax retain their diagnostics. See
2520
+ [conditional fields](conditional-fields.md) for object-boundary ownership.
2521
+
2490
2522
 
2491
2523
  Two requirements that are easy to satisfy incorrectly:
2492
2524
 
@@ -2725,6 +2757,14 @@ libraries MUST NOT give these values different meanings.
2725
2757
  | UI-schema options | `options.readonly` requests read-only behaviour independently of schema annotation |
2726
2758
  | JSON Schema | `readOnly` is the standard spelling. Lowercase is **not** the schema keyword |
2727
2759
 
2760
+ JSON Forms core integrations also preserve core's compatibility spelling
2761
+ `options.readOnly` and `config.readOnly`. Within either source, a boolean
2762
+ `readonly` takes precedence over a boolean `readOnly`; the normal source
2763
+ precedence below still applies. Adapters MUST NOT silently strip these options
2764
+ before core resolves them. Use lowercase `readonly` in portable UI/config
2765
+ examples; other integrations MAY support the compatibility alias. This does not
2766
+ change the JSON Schema keyword's spelling.
2767
+
2728
2768
  JSON Schema `readOnly` is an **annotation**. Standard validation does not
2729
2769
  compare previous and new values, nor enforce immutability because the
2730
2770
  annotation is present. The rendering integration enforces editing
@@ -7973,6 +8013,7 @@ for offline validation; no network resolver is required.
7973
8013
  | `jsonforms-config.schema.json` | Common defaults and shared extension configuration |
7974
8014
  | `jsonforms-extended-config.schema.json` | Extended configuration and security blocks |
7975
8015
  | `example.schema.json` | Example catalog entry and host requirements |
8016
+ | `jsonforms-dynamic-uischema.schema.json` | Separate experimental `$dynamic` descriptor profile (§11); not static v1 conformance |
7976
8017
  | `jsonforms-rule.schema.json` | Standalone serialized rules, shared by both UI profiles |
7977
8018
 
7978
8019
  Unknown options and extension namespaces remain open. Known fields retain their
@@ -7986,7 +8027,9 @@ schema or config. This is separate from a form validator deliberately applying
7986
8027
  defaults to business data under §15.9.
7987
8028
 
7988
8029
  Structural checks cover option shapes, nested UI elements, mutually exclusive
7989
- Button action/script fields. Future dynamic descriptors are not defined. They cannot prove
8030
+ Button action/script fields. The common and extended static UI profiles do not
8031
+ define `$dynamic` descriptors; the separate experimental schema validates their
8032
+ syntax. Structural checks cannot prove
7990
8033
  that a Control scope resolves, a named category exists, a CSS length is useful,
7991
8034
  an expression is safe to execute, a bound is comparable, or a renderer behaves
7992
8035
  correctly. Those require semantic and behavioral conformance tests. Neither a
@@ -8011,7 +8054,7 @@ claim renderer conformance or execute scripts embedded in example documents.
8011
8054
 
8012
8055
  The detailed host and demo acceptance requirements are maintained in
8013
8056
  [Renderer and demo guide](renderer-and-demo.md). See the
8014
- [documentation coverage map](audit.md) for historical sources.
8057
+ [authoring-schema audit and source reconciliation](audit.md) for historical sources.
8015
8058
 
8016
8059
  ### 30.1 Host parity and reusable behavior
8017
8060
 
@@ -8093,6 +8136,13 @@ publish limitations rather than treating a schema definition or a worked example
8093
8136
  as proof of runtime support. External choice providers have no canonical option
8094
8137
  in this version; any relationship to the experimental overlay resolver still needs design.
8095
8138
 
8139
+ ## Appendix B. Accepted supplemental contracts
8140
+
8141
+ These sections supplement the model and renderer requirements above. They are
8142
+ accepted contracts, subject to capability declarations and documented platform
8143
+ limits; they are not the proposals in Appendix A. Existing section anchors remain
8144
+ stable for links from examples and implementation guides.
8145
+
8096
8146
  ### Array panel collapsing
8097
8147
 
8098
8148
  All array presentations (table, expandable items, list with detail, and AG Grid)
@@ -8113,7 +8163,12 @@ shared controls, normal tables, AG Grid and detail editors with English/Bulgaria
8113
8163
  authoring catalogs. It includes valid and deliberately invalid data fixtures.
8114
8164
  Phone validation is an explicit international syntax pattern; it does not prove
8115
8165
  reachability. Standard email/date/time format validation must be enabled by the
8116
- host. See the example for component coverage and library-locale requirements.
8166
+ host. Its root layout opts into conditional work-location and relocation fields;
8167
+ employment cards, skills chips, language selection, adornments and live translated
8168
+ summaries demonstrate additional portable contracts. A separate Demo guide tab
8169
+ identifies what to try while applicant-facing captions stay business-oriented.
8170
+ Named substitution and slot markers require host styling for a visible effect.
8171
+ See the example for component coverage, adapter limits and library-locale requirements.
8117
8172
 
8118
8173
 
8119
8174
  ### Direct errors on arrays and objects
@@ -8401,13 +8456,20 @@ which navigates arbitrary JSON structure.
8401
8456
 
8402
8457
  The selected node's child collection retains native add/delete behavior and
8403
8458
  uses links to child editors rather than recursively expanding their fields.
8459
+ Tree rows also expose rename and delete actions. Rename edits the configured
8460
+ label property's value, not an object key, and validates the new value against
8461
+ its schema. Delete removes the node from its parent's child array and respects
8462
+ minItems, read-only ancestors, and deletion confirmation (the mixed catalog).
8463
+ The displayed root cannot be deleted. Confirmation rechecks the current target
8464
+ and permissions to avoid deleting a replacement node at a reused array index.
8404
8465
  Editing a node preserves sibling data. Node error indicators include descendants
8405
8466
  and follow the container-indicator and validation-visibility settings. After a
8406
8467
  selected node is removed, select its closest remaining parent. Navigation remains
8407
8468
  available in read-only forms; mutations remain disabled.
8408
8469
 
8409
8470
  The recursive-tree example includes a Tree editor tab for comparison. See the
8410
- implementation guide for renderer coverage.
8471
+ [implementation guide](implementation-guide.md#recursive-node-tree-presentation)
8472
+ for acceptance guidance; renderer projects record their own executed coverage.
8411
8473
 
8412
8474
  ### Array detail resolution
8413
8475
 
@@ -8461,10 +8523,20 @@ See the editor-details example.
8461
8523
 
8462
8524
  See [conditional field presentation and graphical authoring](conditional-fields.md).
8463
8525
  Use `options.conditionalFields: true` on an object Control or an object-context
8464
- layout entry (VerticalLayout, HorizontalLayout, Group or Categorization), or use
8526
+ layout entry (VerticalLayout, HorizontalLayout, Group, Categorization, TemplateLayout, Template or Slot), or use
8465
8527
  `config.jsonformsExtended.conditionalFields` as the default. Local false opts out.
8466
8528
  The entry owns the projection for descendant layouts and Categories at that
8467
- object boundary. Nested object and array-item boundaries resolve independently.
8529
+ object boundary; their local options are ignored in both directions. Group
8530
+ regions participate in the same filtering. Whole-value editors retain the
8531
+ original schema. Nested object, array-item and independent host form boundaries
8532
+ resolve independently.
8533
+ Filtering the last child from a Group region MUST preserve compatible body
8534
+ editor instances, focus and local drafts. Choose a stable enclosing frame from
8535
+ the authored layout, or use an equivalent reconciliation strategy. Render only
8536
+ active region contents; retaining identity must not expose inactive controls.
8537
+ Projection diagnostics belong to the boundary that evaluated the projection.
8538
+ Descendants reusing it MUST NOT emit or display its failures again. Independent
8539
+ object paths and forms retain their own diagnostics even when messages match.
8468
8540
  Explicit layouts preserve placement and update conditional required indicators
8469
8541
  without generating extra controls. See the conditional-fields contract for
8470
8542
  ownership, validation, examples and platform support limits.
package/docs/todo.md CHANGED
@@ -6,12 +6,24 @@ This backlog separates proposals from implementation work. Renderer projects
6
6
  record their own coverage and implementation issues.
7
7
 
8
8
  - **FUTURE:** discuss and refine the design before implementing it.
9
- - **TODO:** complete or verify implementation and behavior tests before exposing
10
- the option in the published schemas.
9
+ - **TODO:** remaining implementation or adapter verification. For a proposed
10
+ authoring option, complete the promotion checklist before publishing its shape.
11
+ Verification of an accepted contract does not remove it from the schemas.
12
+ - **EXPERIMENTAL:** a separate opt-in profile whose portable conformance remains
13
+ unsettled, even when schema/type/example assets already exist.
11
14
 
12
15
  Unknown extension keys remain allowed by the schemas. Such acceptance does not
13
- validate the feature's shape or claim it is supported. We do not publish a second
14
- schema containing speculative options.
16
+ validate the feature's shape or claim it is supported. Speculative options stay
17
+ out of the static schemas; the explicitly experimental `$dynamic` profile has
18
+ its own schema and does not promote those options into static conformance.
19
+
20
+ ## Review boundary
21
+
22
+ Reviewed against this package on 2026-12-04: schemas, TypeScript authoring,
23
+ examples, behavior vectors and validation tests. This repository ships no
24
+ renderer adapter; the list below does not certify current React, Svelte, Vue or
25
+ native support. Dated source audits retain their stated revision and scope.
26
+ Renderer projects own execution results and remaining implementation issues.
15
27
 
16
28
  ## Accepted optional host styling hooks — adapter verification
17
29
 
@@ -26,9 +38,11 @@ Run the `styling-*` behavior vectors and the
26
38
  [membership walkthrough](../examples/label-interpolation/README.md#optional-host-css-hooks)
27
39
  through each adapter before claiming support. Verify slot placement, translated
28
40
  substitution names, local/host boolean precedence in both directions, Markdown
29
- equivalence, URL decisions, accessibility and disabled-path processing. Record native mappings or documented no-op fallbacks
30
- and Shadow Root styling limits. Renderer execution remains unverified here;
31
- the config-consumption inventory explicitly records that boundary.
41
+ equivalence, URL decisions, accessibility and disabled-path processing. Record
42
+ native mappings or documented no-op fallbacks and Shadow Root styling limits.
43
+ Renderer execution remains unverified here; the
44
+ [config-consumption inventory](../conformance/config-consumption.json) records
45
+ source-level evidence and its limits.
32
46
 
33
47
  ## TODO — portable input adornment verification
34
48
 
@@ -105,12 +119,16 @@ from the overlay resolver and does not grant CEL or trusted-function activation.
105
119
 
106
120
  ## Proposed authoring features awaiting design or implementation
107
121
 
108
- Composite-dialog removal settings,
109
- a separate clear-button option, pending-analysis/submit policy, touch-aware
110
- container summaries, and structured diagnostics require a settled contract and
111
- behavioral evidence before their authoring shapes are promoted. Their absence
112
- from the published schemas is intentional; permissive extension keys do not
113
- promise support.
122
+ Composite-dialog removal settings (`showRemoveButton` / `removeLabel`) and
123
+ additional authoring shapes for pending-analysis/submit policy, touch-aware
124
+ container summaries, and structured diagnostics still need design and behavioral
125
+ evidence before promotion. Their absence from the published schemas is
126
+ intentional; permissive extension keys do not promise support.
127
+
128
+ The existing `clearable` option is already published. Pending-edit validity
129
+ (§18.4), pre-touch filtering (§15.7), and diagnostic guidance (§21) also have
130
+ accepted contracts; completing their adapter integration is separate from
131
+ designing new serialized settings.
114
132
 
115
133
  Implementation-specific findings belong in each renderer project.
116
134
 
@@ -136,11 +154,13 @@ must never be interpreted as evidence that a renderer implements it.
136
154
  Broader conditional composition coverage remains open. Each renderer project
137
155
  tracks its own executable work.
138
156
 
139
- - Extend conditional discovery and authored placement across anyOf/oneOf,
140
- referenced branches and named templates, with reference-scope regressions.
157
+ - Extend conditional discovery into anyOf/oneOf alternatives. Local-reference,
158
+ allOf and named-template placement contracts already have examples and
159
+ acceptance vectors; execute and broaden their adapter coverage rather than
160
+ treating those contracts as undesigned.
141
161
  - Add contains matching-item feedback and explanations of not failures. Do not
142
162
  infer editable fields from a negated schema.
143
- - Implement boolean false presentation with absence as the quiet default:
163
+ - Verify boolean false presentation with absence as the quiet default:
144
164
  hide absent optional forbidden fields and exclude them from add choices.
145
165
  Existing forbidden data must have visible feedback and an allowed removal
146
166
  path, without automatic deletion. Root false and required false properties
@@ -157,10 +177,27 @@ Drag/drop must preserve field bindings and unknown options. These editor feature
157
177
  are planned work, not implemented capabilities or new published option shapes.
158
178
  See [conditional authoring guidance](conditional-fields.md).
159
179
 
180
+ ## TODO — accepted conditional and template adapter verification
181
+
182
+ The [conditional contract](conditional-fields.md) includes direct-layout entry,
183
+ Group regions, whole-value schema preservation, local override ownership,
184
+ reference-aware discovery and Template/Slot address reservation. It is no longer
185
+ limited to direct fields in an object detail. Execute the `conditional-layout-*`,
186
+ `conditional-discovery-*` and `conditional-template-*` cases through each claimed
187
+ adapter. Include retained focus/drafts, stable Group frames, bounded static work,
188
+ independent forms and projection-diagnostic ownership. Keep the dated Svelte
189
+ source findings separate from renderer interaction evidence.
190
+
191
+ Named-template lookup, caller slot overrides and recursion boundaries also have
192
+ accepted contracts and vectors. Verify diagnostics and cycle termination in
193
+ renderer repositories; missing execution is not a missing authoring design.
194
+
160
195
  ## Completed authoring work
161
196
 
162
- Mixed type-specific details, shared editor detail modes, conditional object field
163
- discovery and Template/Slot examples now have documented authoring contracts and
164
- regression coverage. Their implemented slices are in the published schemas.
165
- Remaining conditional-composition and named-template diagnostic/cycle gaps belong
166
- in renderer backlogs. The drag-and-drop editor itself remains future work.
197
+ Mixed type-specific details, shared editor detail modes, conditional object and
198
+ layout presentation, Template/Slot placement, `clearable`, and the experimental
199
+ dynamic schema/playground have documented contracts and package validation
200
+ coverage. Static authoring shapes are published; `$dynamic` descriptors use their
201
+ separate experimental schema. These checks validate assets and authoring, not
202
+ renderer interaction. Remaining adapter verification stays above and in renderer
203
+ backlogs. The drag-and-drop editor itself remains future work.
@@ -201,6 +201,20 @@
201
201
  ],
202
202
  "hostRequirements": []
203
203
  },
204
+ {
205
+ "id": "conditional-template-slots",
206
+ "title": "Conditional template slots",
207
+ "files": [
208
+ "config.json",
209
+ "data.json",
210
+ "schema.json",
211
+ "translations.json",
212
+ "uischema.json"
213
+ ],
214
+ "hostRequirements": [
215
+ "Register the Ractive TemplateLayout profile and allow script evaluation for this trusted template."
216
+ ]
217
+ },
204
218
  {
205
219
  "id": "container-validation-indicator",
206
220
  "title": "Container validation indicator",
@@ -363,7 +377,8 @@
363
377
  "config.json"
364
378
  ],
365
379
  "hostRequirements": [
366
- "Register base and extended renderers/cells, including AG Grid and Monaco. Enable standard format validation and load English or Bulgarian renderer messages. Phone validation checks international syntax, not assignment or reachability."
380
+ "Register base and extended renderers/cells, including AG Grid and Monaco. Enable standard format validation and load English or Bulgarian renderer messages. Phone validation checks international syntax, not assignment or reachability.",
381
+ "Support conditional object-context layouts, choice cards, chips, multi-select and portable input adornments (semantic lock/information icons). Label interpolation uses dynamicValues; optional part/textParamSpans styling requires host CSS in the form styling scope. Report unsupported capabilities; no experimental $dynamic or template engine is required."
367
382
  ]
368
383
  },
369
384
  {
@@ -25,3 +25,13 @@ visibility of those base fields.
25
25
 
26
26
  This example supports graphical authoring through serializable control scopes,
27
27
  detail layouts and config. It does not include a drag-and-drop editor.
28
+
29
+
30
+ Additional acceptance cases in conformance/behavior.json cover conditions reached
31
+ through allOf/$ref, ordinary allOf properties and required names without an if,
32
+ and direct layouts whose schema type is ["object", "null"]. They reuse explicit
33
+ name/vat/nickname placement. Business data requires name and vat; personal data
34
+ replaces vat with nickname except in the unconditional allOf case. Nullable layouts
35
+ must preserve null through null/object/null transitions. Separate reference-context
36
+ cases check cache isolation, missing references and cycles. These are additional
37
+ acceptance vectors rather than new tabs in the interactive example.
@@ -0,0 +1,14 @@
1
+ # Conditional template slots
2
+
3
+ This root TemplateLayout owns the object projection. The three authored decimal
4
+ slots are customer type (0), VAT (1), and notes (2). With personal data, slot 1 is
5
+ known but empty; notes stays in slot 2. Business data restores VAT and requires
6
+ both VAT and notes. Switching back retains VAT in data and removes the two
7
+ conditional required indicators. No unknown-slot warning or fallback is expected.
8
+
9
+ The Ractive profile requires the host's explicit script-evaluation permission.
10
+ Use it only for trusted templates. Equivalent acceptance vectors cover named and
11
+ explicit numeric addresses, supported JSX references, compiled native slots,
12
+ registered Template/Slot composition, unknown names and retained editor focus.
13
+ Profile support must be verified in an adapter; these fixtures alone do not
14
+ certify any renderer. The original schema remains the document validator.
@@ -0,0 +1,7 @@
1
+ {
2
+ "jsonformsExtended": {
3
+ "security": {
4
+ "allowScriptEvaluation": true
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "kind": "personal",
3
+ "vatNumber": "BG123",
4
+ "notes": "Retained notes"
5
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "kind": {
5
+ "type": "string",
6
+ "enum": [
7
+ "personal",
8
+ "business"
9
+ ]
10
+ },
11
+ "notes": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "if": {
16
+ "properties": {
17
+ "kind": {
18
+ "const": "business"
19
+ }
20
+ },
21
+ "required": [
22
+ "kind"
23
+ ]
24
+ },
25
+ "then": {
26
+ "properties": {
27
+ "vatNumber": {
28
+ "type": "string",
29
+ "minLength": 3
30
+ }
31
+ },
32
+ "required": [
33
+ "vatNumber",
34
+ "notes"
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "en": {
3
+ "kind.label": "Customer type",
4
+ "kind.personal": "Personal",
5
+ "kind.business": "Business",
6
+ "vatNumber.label": "VAT number",
7
+ "notes.label": "Notes"
8
+ },
9
+ "bg": {
10
+ "kind.label": "Вид клиент",
11
+ "kind.personal": "Физическо лице",
12
+ "kind.business": "Фирма",
13
+ "vatNumber.label": "ДДС номер",
14
+ "notes.label": "Бележки"
15
+ }
16
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "type": "TemplateLayout",
3
+ "lang": "ractive",
4
+ "options": {
5
+ "conditionalFields": true
6
+ },
7
+ "template": "<section><div data-kind>{{>0}}</div><div data-vat>{{>1}}</div><div data-notes>{{>2}}</div></section>",
8
+ "elements": [
9
+ {
10
+ "type": "Control",
11
+ "scope": "#/properties/kind"
12
+ },
13
+ {
14
+ "type": "Control",
15
+ "scope": "#/properties/vatNumber"
16
+ },
17
+ {
18
+ "type": "Control",
19
+ "scope": "#/properties/notes"
20
+ }
21
+ ]
22
+ }