@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
@@ -921,7 +921,10 @@
921
921
  "false"
922
922
  ],
923
923
  "absentDataDiagnostic": false,
924
- "sameOutputAfterUnwrappingAsDisabled": true
924
+ "sameOutputAfterUnwrappingAsDisabled": true,
925
+ "unknownVariableDiagnostics": [
926
+ "locale"
927
+ ]
925
928
  }
926
929
  },
927
930
  {
@@ -1546,7 +1549,30 @@
1546
1549
  "nestedLayouts": [
1547
1550
  "VerticalLayout",
1548
1551
  "HorizontalLayout"
1549
- ]
1552
+ ],
1553
+ "uischema": {
1554
+ "type": "Group",
1555
+ "options": {
1556
+ "conditionalFields": false
1557
+ },
1558
+ "elements": [
1559
+ {
1560
+ "type": "VerticalLayout",
1561
+ "options": {
1562
+ "conditionalFields": true
1563
+ },
1564
+ "elements": [
1565
+ {
1566
+ "type": "HorizontalLayout",
1567
+ "options": {
1568
+ "conditionalFields": true
1569
+ },
1570
+ "elements": []
1571
+ }
1572
+ ]
1573
+ }
1574
+ ]
1575
+ }
1550
1576
  },
1551
1577
  "expected": {
1552
1578
  "projectionEnabled": false,
@@ -1563,13 +1589,28 @@
1563
1589
  "business",
1564
1590
  "personal"
1565
1591
  ],
1566
- "validationMode": "NoValidation"
1592
+ "validationMode": "NoValidation",
1593
+ "independentForms": {
1594
+ "outer": {
1595
+ "dataPath": "",
1596
+ "local": false,
1597
+ "global": true
1598
+ },
1599
+ "embeddedInner": {
1600
+ "dataPath": "",
1601
+ "local": true,
1602
+ "global": false
1603
+ }
1604
+ }
1567
1605
  },
1568
1606
  "expected": {
1569
1607
  "evaluateEachObjectIndependently": true,
1570
1608
  "requiredMarkersFollowEachObject": true,
1571
1609
  "noDataMutation": true,
1572
- "independentHostFormsAtSameRootPath": true
1610
+ "independentHostFormsAtSameRootPath": true,
1611
+ "outerProjectionEnabled": false,
1612
+ "embeddedInnerProjectionEnabled": true,
1613
+ "resetInheritanceAtHostFormBoundary": true
1573
1614
  }
1574
1615
  },
1575
1616
  {
@@ -1596,7 +1637,1464 @@
1596
1637
  "asteriskFollowsActiveRequiredUnion": true,
1597
1638
  "insertUnplacedBranchFields": false,
1598
1639
  "uiRulesStillApply": true,
1599
- "preserveEmptyContainers": true
1640
+ "preserveEmptyContainers": true,
1641
+ "preserveExistingSlotsForEmptiedPlainLayouts": true
1642
+ }
1643
+ },
1644
+ {
1645
+ "id": "interpolation-explicit-locale",
1646
+ "section": "9.1, 9.4a",
1647
+ "input": {
1648
+ "uischema": {
1649
+ "type": "Label",
1650
+ "text": "{language} / {locale}",
1651
+ "options": {
1652
+ "interpolate": true,
1653
+ "textParamSpans": true,
1654
+ "textParams": {
1655
+ "language": "{locale}",
1656
+ "locale": "{locale}"
1657
+ }
1658
+ }
1659
+ },
1660
+ "config": {
1661
+ "jsonformsExtended": {
1662
+ "dynamicValues": {
1663
+ "enabled": false
1664
+ }
1665
+ }
1666
+ },
1667
+ "hostLocaleSequence": [
1668
+ "en",
1669
+ "bg"
1670
+ ],
1671
+ "platform": "HTML"
1672
+ },
1673
+ "expected": {
1674
+ "textSequence": [
1675
+ "en / en",
1676
+ "bg / bg"
1677
+ ],
1678
+ "parameterSpans": [
1679
+ "language",
1680
+ "locale"
1681
+ ],
1682
+ "unknownVariableDiagnostics": [],
1683
+ "parameterSelfReference": false,
1684
+ "dataNamespacesEnabled": false
1685
+ }
1686
+ },
1687
+ {
1688
+ "id": "interpolation-undeclared-locale",
1689
+ "section": "9.1, 9.5",
1690
+ "input": {
1691
+ "uischema": {
1692
+ "type": "Label",
1693
+ "text": "Language: {locale}",
1694
+ "options": {
1695
+ "interpolate": true
1696
+ }
1697
+ },
1698
+ "hostLocale": "en",
1699
+ "textParamSpans": [
1700
+ false,
1701
+ true
1702
+ ]
1703
+ },
1704
+ "expected": {
1705
+ "text": "Language: ",
1706
+ "unknownVariableDiagnostics": [
1707
+ "locale"
1708
+ ],
1709
+ "parameterSpans": [],
1710
+ "sameDiagnosticsWithMarkersOnAndOff": true
1711
+ }
1712
+ },
1713
+ {
1714
+ "id": "styling-invalid-local-default",
1715
+ "section": "9.4a",
1716
+ "input": {
1717
+ "uncheckedLocalValues": [
1718
+ "yes",
1719
+ 0,
1720
+ null,
1721
+ {},
1722
+ []
1723
+ ],
1724
+ "hostDefaults": [
1725
+ true,
1726
+ false
1727
+ ],
1728
+ "uischema": {
1729
+ "type": "Label",
1730
+ "text": "{member}",
1731
+ "options": {
1732
+ "interpolate": true,
1733
+ "textParams": {
1734
+ "member": "Morgan"
1735
+ }
1736
+ }
1737
+ },
1738
+ "platform": "HTML"
1739
+ },
1740
+ "expected": {
1741
+ "authoringValid": false,
1742
+ "effectiveValueForEachInvalidLocal": "host default",
1743
+ "parameterSpansWhenHostTrue": [
1744
+ "member"
1745
+ ],
1746
+ "parameterSpansWhenHostFalse": [],
1747
+ "truthinessCoercion": false
1748
+ }
1749
+ },
1750
+ {
1751
+ "id": "conditional-layout-nested-opt-out-ignored",
1752
+ "section": "Conditional fields",
1753
+ "input": {
1754
+ "global": false,
1755
+ "uischema": {
1756
+ "type": "Group",
1757
+ "options": {
1758
+ "conditionalFields": true
1759
+ },
1760
+ "elements": [
1761
+ {
1762
+ "type": "VerticalLayout",
1763
+ "options": {
1764
+ "conditionalFields": false
1765
+ },
1766
+ "elements": []
1767
+ }
1768
+ ]
1769
+ }
1770
+ },
1771
+ "expected": {
1772
+ "projectionEnabled": true,
1773
+ "descendantOptionIgnored": true,
1774
+ "projectOnceAtOwner": true
1775
+ }
1776
+ },
1777
+ {
1778
+ "id": "conditional-layout-whole-value-editor",
1779
+ "section": "Conditional fields",
1780
+ "input": {
1781
+ "schema": {
1782
+ "type": "object",
1783
+ "properties": {
1784
+ "kind": {
1785
+ "type": "string"
1786
+ },
1787
+ "name": {
1788
+ "type": "string"
1789
+ }
1790
+ },
1791
+ "if": {
1792
+ "properties": {
1793
+ "kind": {
1794
+ "const": "business"
1795
+ }
1796
+ },
1797
+ "required": [
1798
+ "kind"
1799
+ ]
1800
+ },
1801
+ "then": {
1802
+ "properties": {
1803
+ "vat": {
1804
+ "type": "string"
1805
+ }
1806
+ },
1807
+ "required": [
1808
+ "vat"
1809
+ ]
1810
+ },
1811
+ "else": {
1812
+ "properties": {
1813
+ "nickname": {
1814
+ "type": "string"
1815
+ }
1816
+ }
1817
+ }
1818
+ },
1819
+ "data": {
1820
+ "kind": "personal",
1821
+ "nickname": "M",
1822
+ "vat": "retained"
1823
+ },
1824
+ "uischema": {
1825
+ "type": "VerticalLayout",
1826
+ "options": {
1827
+ "conditionalFields": true
1828
+ },
1829
+ "elements": [
1830
+ {
1831
+ "type": "Control",
1832
+ "scope": "#/properties/nickname"
1833
+ },
1834
+ {
1835
+ "type": "Control",
1836
+ "scope": "#/properties/vat"
1837
+ },
1838
+ {
1839
+ "type": "Control",
1840
+ "scope": "#",
1841
+ "options": {
1842
+ "format": "code"
1843
+ }
1844
+ }
1845
+ ]
1846
+ },
1847
+ "additionalEditorRoles": [
1848
+ "custom whole-value editor",
1849
+ "same-object field editor",
1850
+ "same-object field editor with local false"
1851
+ ]
1852
+ },
1853
+ "expected": {
1854
+ "visibleFieldScopes": [
1855
+ "#/properties/nickname"
1856
+ ],
1857
+ "wholeValueControlRetained": true,
1858
+ "wholeValueEditorSchema": "original authored schema with if/then/else and original reference context",
1859
+ "customWholeValueEditorSchema": "original authored schema",
1860
+ "sameObjectFieldEditorMayReuseProjection": true,
1861
+ "sameObjectFieldEditorLocalFalseSchema": "original authored schema",
1862
+ "originalSchemaValidation": true,
1863
+ "dataUnchanged": true
1864
+ }
1865
+ },
1866
+ {
1867
+ "id": "conditional-layout-regions",
1868
+ "section": "Conditional fields",
1869
+ "input": {
1870
+ "schema": {
1871
+ "type": "object",
1872
+ "properties": {
1873
+ "kind": {
1874
+ "type": "string"
1875
+ },
1876
+ "name": {
1877
+ "type": "string"
1878
+ }
1879
+ },
1880
+ "if": {
1881
+ "properties": {
1882
+ "kind": {
1883
+ "const": "business"
1884
+ }
1885
+ },
1886
+ "required": [
1887
+ "kind"
1888
+ ]
1889
+ },
1890
+ "then": {
1891
+ "properties": {
1892
+ "vat": {
1893
+ "type": "string"
1894
+ }
1895
+ },
1896
+ "required": [
1897
+ "vat"
1898
+ ]
1899
+ },
1900
+ "else": {
1901
+ "properties": {
1902
+ "nickname": {
1903
+ "type": "string"
1904
+ }
1905
+ }
1906
+ }
1907
+ },
1908
+ "data": {
1909
+ "kind": "personal",
1910
+ "nickname": "M",
1911
+ "vat": "retained"
1912
+ },
1913
+ "uischema": {
1914
+ "type": "Group",
1915
+ "options": {
1916
+ "conditionalFields": true
1917
+ },
1918
+ "header": [
1919
+ {
1920
+ "type": "Label",
1921
+ "text": "Customer"
1922
+ },
1923
+ {
1924
+ "type": "Control",
1925
+ "scope": "#/properties/vat"
1926
+ },
1927
+ {
1928
+ "type": "Control",
1929
+ "scope": "#/properties/nickname"
1930
+ }
1931
+ ],
1932
+ "footer": [
1933
+ {
1934
+ "type": "VerticalLayout",
1935
+ "options": {
1936
+ "conditionalFields": false
1937
+ },
1938
+ "elements": [
1939
+ {
1940
+ "type": "Control",
1941
+ "scope": "#/properties/vat"
1942
+ },
1943
+ {
1944
+ "type": "Control",
1945
+ "scope": "#/properties/nickname"
1946
+ }
1947
+ ]
1948
+ }
1949
+ ],
1950
+ "cover": {
1951
+ "type": "Control",
1952
+ "scope": "#/properties/vat"
1953
+ },
1954
+ "elements": [
1955
+ {
1956
+ "type": "Control",
1957
+ "scope": "#/properties/nickname"
1958
+ }
1959
+ ]
1960
+ }
1961
+ },
1962
+ "expected": {
1963
+ "headerElements": [
1964
+ {
1965
+ "type": "Label",
1966
+ "text": "Customer"
1967
+ },
1968
+ {
1969
+ "type": "Control",
1970
+ "scope": "#/properties/nickname"
1971
+ }
1972
+ ],
1973
+ "footerFieldScopes": [
1974
+ "#/properties/nickname"
1975
+ ],
1976
+ "coverOmitted": true,
1977
+ "regionLayoutLocalFalseIgnored": true,
1978
+ "groupRetained": true,
1979
+ "originalSchemaValidation": true,
1980
+ "dataUnchanged": true
1981
+ }
1982
+ },
1983
+ {
1984
+ "id": "conditional-layout-ignored-options",
1985
+ "section": "Conditional fields",
1986
+ "input": {
1987
+ "global": false,
1988
+ "uischema": {
1989
+ "type": "Categorization",
1990
+ "options": {
1991
+ "conditionalFields": false
1992
+ },
1993
+ "elements": [
1994
+ {
1995
+ "type": "Category",
1996
+ "label": "Customer",
1997
+ "options": {
1998
+ "conditionalFields": true
1999
+ },
2000
+ "elements": [
2001
+ {
2002
+ "type": "Label",
2003
+ "text": "Customer",
2004
+ "options": {
2005
+ "conditionalFields": true
2006
+ }
2007
+ },
2008
+ {
2009
+ "type": "Button",
2010
+ "label": "Continue",
2011
+ "options": {
2012
+ "conditionalFields": true
2013
+ }
2014
+ }
2015
+ ]
2016
+ }
2017
+ ]
2018
+ }
2019
+ },
2020
+ "expected": {
2021
+ "projectionEnabled": false,
2022
+ "categoryOptionIgnored": true,
2023
+ "labelOptionIgnored": true,
2024
+ "buttonOptionIgnored": true,
2025
+ "noNewProjectionOwner": true
2026
+ }
2027
+ },
2028
+ {
2029
+ "id": "conditional-layout-empty-container-slot",
2030
+ "section": "Conditional fields, 5.7",
2031
+ "input": {
2032
+ "schema": {
2033
+ "type": "object",
2034
+ "properties": {
2035
+ "kind": {
2036
+ "type": "string"
2037
+ },
2038
+ "name": {
2039
+ "type": "string"
2040
+ }
2041
+ },
2042
+ "if": {
2043
+ "properties": {
2044
+ "kind": {
2045
+ "const": "business"
2046
+ }
2047
+ },
2048
+ "required": [
2049
+ "kind"
2050
+ ]
2051
+ },
2052
+ "then": {
2053
+ "properties": {
2054
+ "vat": {
2055
+ "type": "string"
2056
+ }
2057
+ },
2058
+ "required": [
2059
+ "vat"
2060
+ ]
2061
+ },
2062
+ "else": {
2063
+ "properties": {
2064
+ "nickname": {
2065
+ "type": "string"
2066
+ }
2067
+ }
2068
+ }
2069
+ },
2070
+ "data": {
2071
+ "kind": "personal"
2072
+ },
2073
+ "uischema": {
2074
+ "type": "VerticalLayout",
2075
+ "options": {
2076
+ "conditionalFields": true
2077
+ },
2078
+ "elements": [
2079
+ {
2080
+ "type": "HorizontalLayout",
2081
+ "options": {
2082
+ "part": "branch-area"
2083
+ },
2084
+ "elements": [
2085
+ {
2086
+ "type": "Control",
2087
+ "scope": "#/properties/vat"
2088
+ }
2089
+ ]
2090
+ }
2091
+ ]
2092
+ },
2093
+ "platform": "HTML with styling hooks"
2094
+ },
2095
+ "expected": {
2096
+ "nestedLayoutRetained": true,
2097
+ "nestedLayoutChildCount": 0,
2098
+ "existingParentSlotRetained": true,
2099
+ "slotDataPart": "branch-area",
2100
+ "extraWrapperRequired": false,
2101
+ "minimumSizeRequired": false,
2102
+ "fixedGapRequired": false,
2103
+ "ordinaryHideRuleCanStillHideContainer": true
2104
+ }
2105
+ },
2106
+ {
2107
+ "id": "conditional-layout-editor-continuity",
2108
+ "section": "Conditional fields",
2109
+ "input": {
2110
+ "placements": [
2111
+ "VerticalLayout",
2112
+ "HorizontalLayout",
2113
+ "Group header",
2114
+ "Group footer",
2115
+ "splitter panes"
2116
+ ],
2117
+ "authoredBindings": [
2118
+ "branch-only field",
2119
+ "retained field",
2120
+ "second occurrence of retained field"
2121
+ ],
2122
+ "operations": [
2123
+ "focus retained field",
2124
+ "start an uncommitted edit",
2125
+ "deactivate earlier branch-only field",
2126
+ "wait for normal commit",
2127
+ "reactivate earlier field"
2128
+ ],
2129
+ "sameFormInstance": true
2130
+ },
2131
+ "expected": {
2132
+ "retainedFocusPreserved": true,
2133
+ "retainedDraftPreserved": true,
2134
+ "pendingWriteCommittedToOriginalField": true,
2135
+ "duplicateOccurrencesRemainIndependent": true,
2136
+ "splitterSizingDoesNotResetRetainedEditors": true,
2137
+ "inactiveDataRetained": true
2138
+ }
2139
+ },
2140
+ {
2141
+ "id": "conditional-layout-static-work",
2142
+ "section": "Conditional fields",
2143
+ "input": {
2144
+ "schemaLifecycle": "immutable identity until replacement",
2145
+ "operations": [
2146
+ "repeat nonconditional discovery",
2147
+ "edit ordinary value without changing active branches",
2148
+ "switch branches with identical property names but different constraints and requiredness",
2149
+ "disable projection",
2150
+ "replace schema identity"
2151
+ ],
2152
+ "additionalCases": [
2153
+ "cyclic allOf discovery",
2154
+ "independent forms",
2155
+ "different array items",
2156
+ "dynamic scope resolution before filtering"
2157
+ ]
2158
+ },
2159
+ "expected": {
2160
+ "repeatDiscoveryAvoidsAnotherImmutableTraversal": true,
2161
+ "unchangedPresentationAvoidsFullRebuild": true,
2162
+ "currentBranchRequirednessAndConstraintsApplied": true,
2163
+ "disabledPredicateEvaluations": 0,
2164
+ "disabledContentFiltering": false,
2165
+ "ownershipBookkeepingPermitted": true,
2166
+ "schemaReplacementInvalidatesDiscovery": true,
2167
+ "validatorMutationIsolationPreserved": true,
2168
+ "noLatencyBenchmarkClaim": true
2169
+ }
2170
+ },
2171
+ {
2172
+ "id": "conditional-layout-discovery-reference",
2173
+ "section": "Conditional fields",
2174
+ "input": {
2175
+ "schema": {
2176
+ "type": "object",
2177
+ "properties": {
2178
+ "kind": {
2179
+ "type": "string"
2180
+ },
2181
+ "name": {
2182
+ "type": "string"
2183
+ }
2184
+ },
2185
+ "definitions": {
2186
+ "Branch": {
2187
+ "if": {
2188
+ "properties": {
2189
+ "kind": {
2190
+ "const": "business"
2191
+ }
2192
+ },
2193
+ "required": [
2194
+ "kind"
2195
+ ]
2196
+ },
2197
+ "then": {
2198
+ "properties": {
2199
+ "vat": {
2200
+ "type": "string"
2201
+ }
2202
+ },
2203
+ "required": [
2204
+ "name",
2205
+ "vat"
2206
+ ]
2207
+ },
2208
+ "else": {
2209
+ "properties": {
2210
+ "nickname": {
2211
+ "type": "string"
2212
+ }
2213
+ }
2214
+ }
2215
+ }
2216
+ },
2217
+ "allOf": [
2218
+ {
2219
+ "$ref": "#/definitions/Branch"
2220
+ }
2221
+ ]
2222
+ },
2223
+ "uischema": {
2224
+ "type": "VerticalLayout",
2225
+ "options": {
2226
+ "conditionalFields": true
2227
+ },
2228
+ "elements": [
2229
+ {
2230
+ "type": "Control",
2231
+ "scope": "#/properties/name"
2232
+ },
2233
+ {
2234
+ "type": "Control",
2235
+ "scope": "#/properties/vat"
2236
+ },
2237
+ {
2238
+ "type": "Control",
2239
+ "scope": "#/properties/nickname"
2240
+ }
2241
+ ]
2242
+ },
2243
+ "data": {
2244
+ "kind": "business",
2245
+ "name": "Ada",
2246
+ "vat": "BG1",
2247
+ "nickname": "kept"
2248
+ },
2249
+ "operations": [
2250
+ "replace kind with personal",
2251
+ "opt out locally while kind is business"
2252
+ ]
2253
+ },
2254
+ "expected": {
2255
+ "businessVisibleFields": [
2256
+ "name",
2257
+ "vat"
2258
+ ],
2259
+ "businessRequiredFields": [
2260
+ "name",
2261
+ "vat"
2262
+ ],
2263
+ "personalVisibleFields": [
2264
+ "name",
2265
+ "nickname"
2266
+ ],
2267
+ "personalRequiredFields": [],
2268
+ "originalSchemaValidationPreserved": true,
2269
+ "inactiveDataRetained": true
2270
+ }
2271
+ },
2272
+ {
2273
+ "id": "conditional-layout-discovery-allOf",
2274
+ "section": "Conditional fields",
2275
+ "input": {
2276
+ "schema": {
2277
+ "type": "object",
2278
+ "properties": {
2279
+ "kind": {
2280
+ "type": "string"
2281
+ },
2282
+ "name": {
2283
+ "type": "string"
2284
+ }
2285
+ },
2286
+ "allOf": [
2287
+ {
2288
+ "properties": {
2289
+ "vat": {
2290
+ "type": "string"
2291
+ }
2292
+ },
2293
+ "required": [
2294
+ "name",
2295
+ "vat"
2296
+ ]
2297
+ }
2298
+ ]
2299
+ },
2300
+ "uischema": {
2301
+ "type": "VerticalLayout",
2302
+ "options": {
2303
+ "conditionalFields": true
2304
+ },
2305
+ "elements": [
2306
+ {
2307
+ "type": "Control",
2308
+ "scope": "#/properties/name"
2309
+ },
2310
+ {
2311
+ "type": "Control",
2312
+ "scope": "#/properties/vat"
2313
+ },
2314
+ {
2315
+ "type": "Control",
2316
+ "scope": "#/properties/nickname"
2317
+ }
2318
+ ]
2319
+ },
2320
+ "data": {
2321
+ "kind": "business",
2322
+ "name": "Ada",
2323
+ "vat": "BG1",
2324
+ "nickname": "kept"
2325
+ },
2326
+ "operations": [
2327
+ "replace kind with personal",
2328
+ "opt out locally while kind is business"
2329
+ ]
2330
+ },
2331
+ "expected": {
2332
+ "businessVisibleFields": [
2333
+ "name",
2334
+ "vat"
2335
+ ],
2336
+ "businessRequiredFields": [
2337
+ "name",
2338
+ "vat"
2339
+ ],
2340
+ "personalVisibleFields": [
2341
+ "name",
2342
+ "vat"
2343
+ ],
2344
+ "personalRequiredFields": [
2345
+ "name",
2346
+ "vat"
2347
+ ],
2348
+ "originalSchemaValidationPreserved": true,
2349
+ "inactiveDataRetained": true
2350
+ }
2351
+ },
2352
+ {
2353
+ "id": "conditional-layout-discovery-nullable",
2354
+ "section": "Conditional fields",
2355
+ "input": {
2356
+ "schema": {
2357
+ "type": [
2358
+ "object",
2359
+ "null"
2360
+ ],
2361
+ "properties": {
2362
+ "kind": {
2363
+ "type": "string"
2364
+ },
2365
+ "name": {
2366
+ "type": "string"
2367
+ }
2368
+ },
2369
+ "if": {
2370
+ "properties": {
2371
+ "kind": {
2372
+ "const": "business"
2373
+ }
2374
+ },
2375
+ "required": [
2376
+ "kind"
2377
+ ]
2378
+ },
2379
+ "then": {
2380
+ "properties": {
2381
+ "vat": {
2382
+ "type": "string"
2383
+ }
2384
+ },
2385
+ "required": [
2386
+ "name",
2387
+ "vat"
2388
+ ]
2389
+ },
2390
+ "else": {
2391
+ "properties": {
2392
+ "nickname": {
2393
+ "type": "string"
2394
+ }
2395
+ }
2396
+ }
2397
+ },
2398
+ "uischema": {
2399
+ "type": "VerticalLayout",
2400
+ "options": {
2401
+ "conditionalFields": true
2402
+ },
2403
+ "elements": [
2404
+ {
2405
+ "type": "Control",
2406
+ "scope": "#/properties/name"
2407
+ },
2408
+ {
2409
+ "type": "Control",
2410
+ "scope": "#/properties/vat"
2411
+ },
2412
+ {
2413
+ "type": "Control",
2414
+ "scope": "#/properties/nickname"
2415
+ }
2416
+ ]
2417
+ },
2418
+ "data": {
2419
+ "kind": "business",
2420
+ "name": "Ada",
2421
+ "vat": "BG1",
2422
+ "nickname": "kept"
2423
+ },
2424
+ "operations": [
2425
+ "replace kind with personal",
2426
+ "opt out locally while kind is business",
2427
+ "replace data with null, then restore object data"
2428
+ ]
2429
+ },
2430
+ "expected": {
2431
+ "businessVisibleFields": [
2432
+ "name",
2433
+ "vat"
2434
+ ],
2435
+ "businessRequiredFields": [
2436
+ "name",
2437
+ "vat"
2438
+ ],
2439
+ "personalVisibleFields": [
2440
+ "name",
2441
+ "nickname"
2442
+ ],
2443
+ "personalRequiredFields": [],
2444
+ "originalSchemaValidationPreserved": true,
2445
+ "inactiveDataRetained": true,
2446
+ "nullRemainsNull": true,
2447
+ "doesNotInitializeObject": true
2448
+ }
2449
+ },
2450
+ {
2451
+ "id": "conditional-discovery-reference-context",
2452
+ "section": "Conditional fields",
2453
+ "input": {
2454
+ "schema": {
2455
+ "$ref": "#/definitions/Branch"
2456
+ },
2457
+ "roots": [
2458
+ {
2459
+ "definitions": {
2460
+ "Branch": {
2461
+ "if": {
2462
+ "properties": {
2463
+ "kind": {
2464
+ "const": "business"
2465
+ }
2466
+ },
2467
+ "required": [
2468
+ "kind"
2469
+ ]
2470
+ },
2471
+ "then": {
2472
+ "properties": {
2473
+ "vat": {
2474
+ "type": "string"
2475
+ }
2476
+ },
2477
+ "required": [
2478
+ "name",
2479
+ "vat"
2480
+ ]
2481
+ },
2482
+ "else": {
2483
+ "properties": {
2484
+ "nickname": {
2485
+ "type": "string"
2486
+ }
2487
+ }
2488
+ }
2489
+ }
2490
+ }
2491
+ },
2492
+ {
2493
+ "definitions": {
2494
+ "Branch": {
2495
+ "type": "string"
2496
+ }
2497
+ }
2498
+ }
2499
+ ],
2500
+ "additionalCases": [
2501
+ "cyclic allOf without conditions",
2502
+ "missing reference",
2503
+ "allOf containing minProperties only"
2504
+ ]
2505
+ },
2506
+ "expected": {
2507
+ "discoveryByRoot": [
2508
+ true,
2509
+ false
2510
+ ],
2511
+ "completedSearchCachedPerSchemaAndRoot": true,
2512
+ "cycleTerminates": true,
2513
+ "missingReferenceReportedWithoutLosingBaseFields": true,
2514
+ "constraintOnlyAllOfDoesNotActivateFieldProjection": true
2515
+ }
2516
+ },
2517
+ {
2518
+ "id": "conditional-template-positional",
2519
+ "section": "13.5 / Conditional fields",
2520
+ "input": {
2521
+ "schema": {
2522
+ "type": "object",
2523
+ "properties": {
2524
+ "kind": {
2525
+ "type": "string",
2526
+ "enum": [
2527
+ "personal",
2528
+ "business"
2529
+ ]
2530
+ },
2531
+ "notes": {
2532
+ "type": "string"
2533
+ }
2534
+ },
2535
+ "if": {
2536
+ "properties": {
2537
+ "kind": {
2538
+ "const": "business"
2539
+ }
2540
+ },
2541
+ "required": [
2542
+ "kind"
2543
+ ]
2544
+ },
2545
+ "then": {
2546
+ "properties": {
2547
+ "vatNumber": {
2548
+ "type": "string",
2549
+ "minLength": 3
2550
+ }
2551
+ },
2552
+ "required": [
2553
+ "vatNumber",
2554
+ "notes"
2555
+ ]
2556
+ }
2557
+ },
2558
+ "uischema": {
2559
+ "type": "TemplateLayout",
2560
+ "lang": "ractive",
2561
+ "options": {
2562
+ "conditionalFields": true
2563
+ },
2564
+ "template": "<section><div data-kind>{{>0}}</div><div data-vat>{{>1}}</div><div data-notes>{{>2}}</div></section>",
2565
+ "elements": [
2566
+ {
2567
+ "type": "Control",
2568
+ "scope": "#/properties/kind"
2569
+ },
2570
+ {
2571
+ "type": "Control",
2572
+ "scope": "#/properties/vatNumber"
2573
+ },
2574
+ {
2575
+ "type": "Control",
2576
+ "scope": "#/properties/notes"
2577
+ }
2578
+ ]
2579
+ },
2580
+ "data": {
2581
+ "kind": "personal",
2582
+ "vatNumber": "BG123",
2583
+ "notes": "Retained notes"
2584
+ },
2585
+ "operations": [
2586
+ "personal to business to personal",
2587
+ "render at root and object Control detail",
2588
+ "render the ordered children view",
2589
+ "repeat a known slot reference"
2590
+ ]
2591
+ },
2592
+ "expected": {
2593
+ "knownSlotCount": 3,
2594
+ "personalSlotContent": [
2595
+ "kind",
2596
+ null,
2597
+ "notes"
2598
+ ],
2599
+ "businessSlotContent": [
2600
+ "kind",
2601
+ "vatNumber",
2602
+ "notes"
2603
+ ],
2604
+ "noNumericAliases": true,
2605
+ "knownInactiveMountsControl": false,
2606
+ "knownInactiveActivatesFallback": false,
2607
+ "knownInactiveEmitsUnknownSlot": false,
2608
+ "retainedEditorIdentityAndFocus": true,
2609
+ "retainedTextSelection": true,
2610
+ "originalValidationAndInactiveDataPreserved": true,
2611
+ "inactiveSlotContributesSectionBinding": false
2612
+ }
2613
+ },
2614
+ {
2615
+ "id": "conditional-template-named",
2616
+ "section": "13.5 / Conditional fields",
2617
+ "input": {
2618
+ "schema": {
2619
+ "type": "object",
2620
+ "properties": {
2621
+ "kind": {
2622
+ "type": "string",
2623
+ "enum": [
2624
+ "personal",
2625
+ "business"
2626
+ ]
2627
+ },
2628
+ "notes": {
2629
+ "type": "string"
2630
+ }
2631
+ },
2632
+ "if": {
2633
+ "properties": {
2634
+ "kind": {
2635
+ "const": "business"
2636
+ }
2637
+ },
2638
+ "required": [
2639
+ "kind"
2640
+ ]
2641
+ },
2642
+ "then": {
2643
+ "properties": {
2644
+ "vatNumber": {
2645
+ "type": "string",
2646
+ "minLength": 3
2647
+ }
2648
+ },
2649
+ "required": [
2650
+ "vatNumber",
2651
+ "notes"
2652
+ ]
2653
+ }
2654
+ },
2655
+ "uischema": {
2656
+ "type": "TemplateLayout",
2657
+ "lang": "ractive",
2658
+ "options": {
2659
+ "conditionalFields": true
2660
+ },
2661
+ "template": "<section><div data-kind>{{>kind}}</div><div data-vat>{{>vatNumber}}</div><div data-notes>{{>notes}}</div></section>",
2662
+ "elements": [
2663
+ {
2664
+ "type": "Control",
2665
+ "scope": "#/properties/kind",
2666
+ "name": "kind"
2667
+ },
2668
+ {
2669
+ "type": "Control",
2670
+ "scope": "#/properties/vatNumber",
2671
+ "name": "vatNumber"
2672
+ },
2673
+ {
2674
+ "type": "Control",
2675
+ "scope": "#/properties/notes",
2676
+ "name": "notes"
2677
+ }
2678
+ ]
2679
+ },
2680
+ "data": {
2681
+ "kind": "personal",
2682
+ "vatNumber": "BG123",
2683
+ "notes": "Retained notes"
2684
+ },
2685
+ "operations": [
2686
+ "personal to business to personal",
2687
+ "render at root and object Control detail",
2688
+ "render the ordered children view",
2689
+ "repeat a known slot reference"
2690
+ ]
2691
+ },
2692
+ "expected": {
2693
+ "knownSlotCount": 3,
2694
+ "personalSlotContent": [
2695
+ "kind",
2696
+ null,
2697
+ "notes"
2698
+ ],
2699
+ "businessSlotContent": [
2700
+ "kind",
2701
+ "vatNumber",
2702
+ "notes"
2703
+ ],
2704
+ "noNumericAliases": true,
2705
+ "knownInactiveMountsControl": false,
2706
+ "knownInactiveActivatesFallback": false,
2707
+ "knownInactiveEmitsUnknownSlot": false,
2708
+ "retainedEditorIdentityAndFocus": true,
2709
+ "retainedTextSelection": true,
2710
+ "originalValidationAndInactiveDataPreserved": true,
2711
+ "inactiveSlotContributesSectionBinding": false
2712
+ }
2713
+ },
2714
+ {
2715
+ "id": "conditional-template-explicit-numeric",
2716
+ "section": "13.5 / Conditional fields",
2717
+ "input": {
2718
+ "schema": {
2719
+ "type": "object",
2720
+ "properties": {
2721
+ "kind": {
2722
+ "type": "string",
2723
+ "enum": [
2724
+ "personal",
2725
+ "business"
2726
+ ]
2727
+ },
2728
+ "notes": {
2729
+ "type": "string"
2730
+ }
2731
+ },
2732
+ "if": {
2733
+ "properties": {
2734
+ "kind": {
2735
+ "const": "business"
2736
+ }
2737
+ },
2738
+ "required": [
2739
+ "kind"
2740
+ ]
2741
+ },
2742
+ "then": {
2743
+ "properties": {
2744
+ "vatNumber": {
2745
+ "type": "string",
2746
+ "minLength": 3
2747
+ }
2748
+ },
2749
+ "required": [
2750
+ "vatNumber",
2751
+ "notes"
2752
+ ]
2753
+ }
2754
+ },
2755
+ "uischema": {
2756
+ "type": "TemplateLayout",
2757
+ "lang": "ractive",
2758
+ "options": {
2759
+ "conditionalFields": true
2760
+ },
2761
+ "template": "<section><div data-kind>{{>0}}</div><div data-vat>{{>1}}</div><div data-notes>{{>2}}</div></section>",
2762
+ "elements": [
2763
+ {
2764
+ "type": "Control",
2765
+ "scope": "#/properties/kind",
2766
+ "name": "0"
2767
+ },
2768
+ {
2769
+ "type": "Control",
2770
+ "scope": "#/properties/vatNumber",
2771
+ "name": "1"
2772
+ },
2773
+ {
2774
+ "type": "Control",
2775
+ "scope": "#/properties/notes",
2776
+ "name": "2"
2777
+ }
2778
+ ]
2779
+ },
2780
+ "data": {
2781
+ "kind": "personal",
2782
+ "vatNumber": "BG123",
2783
+ "notes": "Retained notes"
2784
+ },
2785
+ "operations": [
2786
+ "personal to business to personal",
2787
+ "render at root and object Control detail",
2788
+ "render the ordered children view",
2789
+ "repeat a known slot reference"
2790
+ ]
2791
+ },
2792
+ "expected": {
2793
+ "knownSlotCount": 3,
2794
+ "personalSlotContent": [
2795
+ "kind",
2796
+ null,
2797
+ "notes"
2798
+ ],
2799
+ "businessSlotContent": [
2800
+ "kind",
2801
+ "vatNumber",
2802
+ "notes"
2803
+ ],
2804
+ "noNumericAliases": true,
2805
+ "knownInactiveMountsControl": false,
2806
+ "knownInactiveActivatesFallback": false,
2807
+ "knownInactiveEmitsUnknownSlot": false,
2808
+ "retainedEditorIdentityAndFocus": true,
2809
+ "retainedTextSelection": true,
2810
+ "originalValidationAndInactiveDataPreserved": true,
2811
+ "inactiveSlotContributesSectionBinding": false
2812
+ }
2813
+ },
2814
+ {
2815
+ "id": "conditional-template-missing-name",
2816
+ "section": "13.5 / Conditional fields",
2817
+ "input": {
2818
+ "knownNames": [
2819
+ "vatNumber",
2820
+ "notes"
2821
+ ],
2822
+ "inactiveNames": [
2823
+ "vatNumber"
2824
+ ],
2825
+ "references": [
2826
+ "vatNumber",
2827
+ "notes",
2828
+ "typo"
2829
+ ],
2830
+ "syntaxVariants": [
2831
+ "partial",
2832
+ "native Slot",
2833
+ "supported JSX expression",
2834
+ "supported JSX component"
2835
+ ]
2836
+ },
2837
+ "expected": {
2838
+ "vatNumber": "empty without fallback or unknown-slot diagnostic",
2839
+ "notes": "delegated field renderer",
2840
+ "typo": "normal profile unknown-name diagnostic/fallback",
2841
+ "undefinedComponentGloballyIgnored": false,
2842
+ "unsupportedSyntaxStillDiagnosed": true
2843
+ }
2844
+ },
2845
+ {
2846
+ "id": "conditional-template-ownership",
2847
+ "section": "Conditional fields",
2848
+ "input": {
2849
+ "entryTypes": [
2850
+ "TemplateLayout",
2851
+ "Template",
2852
+ "Slot"
2853
+ ],
2854
+ "global": true,
2855
+ "cases": [
2856
+ "root local true",
2857
+ "root local false",
2858
+ "descendant true below disabled owner",
2859
+ "registered layout resolved after projection",
2860
+ "nested object reuses a schema at a distinct data path"
2861
+ ]
2862
+ },
2863
+ "expected": {
2864
+ "rootTemplateCanOwnProjection": true,
2865
+ "entryLocalFalseWins": true,
2866
+ "descendantCannotOverrideOwner": true,
2867
+ "registeredLayoutInheritsProjection": true,
2868
+ "registeredInactiveOverrideDoesNotUseSlotFallback": true,
2869
+ "noNewObjectDataBinding": true,
2870
+ "schemaIdentityDoesNotMergeObjectBoundaries": true
2871
+ }
2872
+ },
2873
+ {
2874
+ "id": "native-input-original-text",
2875
+ "section": "Scalar controls and temporal editing",
2876
+ "input": {
2877
+ "cases": [
2878
+ "integer 1.9",
2879
+ "integer 9007199254740993",
2880
+ "integer 1e3",
2881
+ "maxLength:1 supplementary character",
2882
+ "IME intermediate text",
2883
+ "masked February 31",
2884
+ "unpadded months 2–9"
2885
+ ],
2886
+ "boundaries": [
2887
+ "control",
2888
+ "cell",
2889
+ "native picker"
2890
+ ]
2891
+ },
2892
+ "expected": {
2893
+ "fractionNeverTruncated": true,
2894
+ "unsafeDigitsNeverRoundedIntoCommit": true,
2895
+ "exponentNeverParsedAsPrefix": true,
2896
+ "lengthCountsCodePoints": true,
2897
+ "compositionNotPrematurelyCommitted": true,
2898
+ "impossibleDateNotNormalized": true,
2899
+ "validMonthDigitsRetained": true
2900
+ }
2901
+ },
2902
+ {
2903
+ "id": "pending-validity-without-data-change",
2904
+ "section": "Pending edits and validation",
2905
+ "input": {
2906
+ "cases": [
2907
+ "invalid local duration draft",
2908
+ "pending file read",
2909
+ "owner error publication",
2910
+ "command without blur",
2911
+ "clear during read",
2912
+ "nested independent form"
2913
+ ]
2914
+ },
2915
+ "expected": {
2916
+ "hostNotifiedWithoutDataEdit": true,
2917
+ "unresolvedDraftBlocksConsumption": true,
2918
+ "commandReadsFlushedCurrentData": true,
2919
+ "clearInvalidatesRead": true,
2920
+ "hostErrorsPreserved": true,
2921
+ "independentFormDoesNotInheritPending": true
2922
+ }
2923
+ },
2924
+ {
2925
+ "id": "template-lookup-ownership",
2926
+ "section": "Template and Slot",
2927
+ "input": {
2928
+ "cases": [
2929
+ "duplicate registry name",
2930
+ "duplicate caller child name",
2931
+ "literal constructor slot",
2932
+ "unfilled structural slot",
2933
+ "same-form same-path recursive expansion",
2934
+ "independent nested form reuse"
2935
+ ]
2936
+ },
2937
+ "expected": {
2938
+ "firstRegistryWins": true,
2939
+ "laterCallerChildWins": true,
2940
+ "duplicatesDiagnosed": true,
2941
+ "namesUseOwnKeys": true,
2942
+ "unfilledSlotCanUseFallback": true,
2943
+ "sameBoundaryRecursionTerminates": true,
2944
+ "independentFormReuseAllowed": true
2945
+ }
2946
+ },
2947
+ {
2948
+ "id": "literal-tree-selected-editor",
2949
+ "section": "Mixed tree editing",
2950
+ "input": {
2951
+ "keys": [
2952
+ "a.b",
2953
+ "",
2954
+ " renamed.key ",
2955
+ "constructor"
2956
+ ],
2957
+ "neighbor": {
2958
+ "a": {
2959
+ "b": "distinct value"
2960
+ }
2961
+ },
2962
+ "actions": [
2963
+ "select literal member",
2964
+ "edit selected detail",
2965
+ "rename with punctuation and spaces"
2966
+ ]
2967
+ },
2968
+ "expected": {
2969
+ "selectedValueUsesLiteralSegments": true,
2970
+ "nestedNeighborUnchanged": true,
2971
+ "emptySegmentNotDropped": true,
2972
+ "acceptedRenameNotTrimmed": true,
2973
+ "isolatedEditorRetainsConfiguration": true,
2974
+ "localReferenceContextPreserved": true,
2975
+ "schemaLookupUsesOwnProperties": true,
2976
+ "labelDoesNotInventRenamePermission": true
2977
+ }
2978
+ },
2979
+ {
2980
+ "id": "queued-edit-permission-change",
2981
+ "section": "Readonly and pending edits",
2982
+ "input": {
2983
+ "separateReadonlyFromDisabled": true,
2984
+ "actions": [
2985
+ "type without blur",
2986
+ "make readonly before debounce delivery",
2987
+ "wait for delivery or consume data"
2988
+ ]
2989
+ },
2990
+ "expected": {
2991
+ "notYetCommittedEditCancelled": true,
2992
+ "alreadyCommittedEditNotRolledBack": true,
2993
+ "noWriteThroughOldPermissions": true,
2994
+ "pendingStateCleared": true,
2995
+ "readonlyPresentationCapabilityDeclared": true
2996
+ }
2997
+ },
2998
+ {
2999
+ "id": "conditional-group-empty-region-identity",
3000
+ "section": "Conditional fields",
3001
+ "input": {
3002
+ "regions": [
3003
+ "header",
3004
+ "footer",
3005
+ "cover"
3006
+ ],
3007
+ "collapsible": [
3008
+ false,
3009
+ true
3010
+ ],
3011
+ "actions": [
3012
+ "focus a body editor and select text",
3013
+ "deactivate the last region field",
3014
+ "reactivate that field"
3015
+ ]
3016
+ },
3017
+ "expected": {
3018
+ "inactiveRegionControlsOmitted": true,
3019
+ "sameBodyEditorInstance": true,
3020
+ "focusSelectionAndDraftPreserved": true,
3021
+ "authoredSchemaUnchanged": true
3022
+ }
3023
+ },
3024
+ {
3025
+ "id": "conditional-projection-diagnostic-ownership",
3026
+ "section": "Conditional fields",
3027
+ "input": {
3028
+ "entryPoints": [
3029
+ "object Control",
3030
+ "object-context layout"
3031
+ ],
3032
+ "nestedSameObjectControl": true,
3033
+ "conditionCannotCompile": true,
3034
+ "independentObjectPaths": [
3035
+ "left",
3036
+ "right"
3037
+ ]
3038
+ },
3039
+ "expected": {
3040
+ "oneReportPerOwningProjection": true,
3041
+ "reuseDoesNotRepeatVisibleMessagesOrCallbacks": true,
3042
+ "independentPathsRetainSeparateFailures": true
3043
+ }
3044
+ },
3045
+ {
3046
+ "id": "core-readonly-compatibility-alias",
3047
+ "section": "15.1",
3048
+ "input": {
3049
+ "integration": "JSON Forms core",
3050
+ "cases": [
3051
+ {
3052
+ "config": {
3053
+ "readOnly": true
3054
+ },
3055
+ "options": {},
3056
+ "readonly": true
3057
+ },
3058
+ {
3059
+ "config": {},
3060
+ "options": {
3061
+ "readOnly": true
3062
+ },
3063
+ "readonly": true
3064
+ },
3065
+ {
3066
+ "config": {},
3067
+ "options": {
3068
+ "readonly": false,
3069
+ "readOnly": true
3070
+ },
3071
+ "readonly": false
3072
+ },
3073
+ {
3074
+ "config": {
3075
+ "readonly": false,
3076
+ "readOnly": true
3077
+ },
3078
+ "options": {},
3079
+ "readonly": false
3080
+ },
3081
+ {
3082
+ "config": {
3083
+ "readonly": true
3084
+ },
3085
+ "options": {
3086
+ "readOnly": false
3087
+ },
3088
+ "readonly": false
3089
+ }
3090
+ ]
3091
+ },
3092
+ "expected": {
3093
+ "coreAliasNotStripped": true,
3094
+ "canonicalBooleanWinsWithinSource": true,
3095
+ "sourcePrecedenceUnchanged": true,
3096
+ "schemaKeywordRemainsReadOnly": true,
3097
+ "otherIntegrationsDeclareAliasCapability": true
1600
3098
  }
1601
3099
  }
1602
3100
  ]